Skip to content

Commit ca9fdee

Browse files
committed
main: add connection["type"] == "LineChange"
1 parent 13f5d0c commit ca9fdee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ def output(data):
154154
try:
155155
print("========")# Von {} nach {}".format(elem['startLocation']['stopPointName'], elem['endLocation']['stopPointName']))
156156
for connection in elem['elementList']:
157-
if connection['modalType'] == "bus":
157+
if connection["type"] == "LineChange":
158+
print("Bus wechselt Linie")
159+
elif connection['modalType'] == "bus":
158160
print("{} ab {:<30}{:>3} {}".format(
159161
unix_epoch_to_time(
160162
connection['start']['aimedArrivalInUnixEpochMillis'] or
@@ -192,6 +194,7 @@ def output(data):
192194
print()
193195
except KeyError as e:
194196
print(e)
197+
print(connection)
195198
else:
196199
print("Fehler: Weniger als 1 oder mehr als 2 HaltestellenIDs")
197200
exit(1)

0 commit comments

Comments
 (0)