Make matching of ADDED and CANCELED actions explicit.

This commit is contained in:
Nahuel Lofeudo 2023-04-24 06:41:33 +01:00
parent 963b1e5e47
commit 0def241318
1 changed files with 3 additions and 3 deletions

View File

@ -240,11 +240,11 @@ class GTFSClient():
elif trip_action == "ADDED":
# TODO: Add support for added trips
print("Trip {} added.".format(trip_id))
pass
else:
print("Trip {} canceled.".format(trip_id))
elif trip_action == "CANCELED":
canceled_trips.add(trip_id)
else:
print("Unsupported action:", trip_action)
except Exception as x:
print("Error parsing GTFS-R entry:", str(e))
raise(x)