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": elif trip_action == "ADDED":
# TODO: Add support for added trips # TODO: Add support for added trips
print("Trip {} added.".format(trip_id))
pass pass
else: elif trip_action == "CANCELED":
print("Trip {} canceled.".format(trip_id))
canceled_trips.add(trip_id) canceled_trips.add(trip_id)
else:
print("Unsupported action:", trip_action)
except Exception as x: except Exception as x:
print("Error parsing GTFS-R entry:", str(e)) print("Error parsing GTFS-R entry:", str(e))
raise(x) raise(x)