nrtrains now doesn't break if a platform isn't known

This commit is contained in:
Evelyn 2016-10-09 09:01:06 +01:00
parent 8ad424c906
commit 8d74905481

View file

@ -55,7 +55,7 @@ class Module(object):
# "via": t["destination"][0][0]["via"], # "via": t["destination"][0][0]["via"],
"" ""
"via": "", "via": "",
"platform": t["platform"] "platform": "?" if not "platform" in t else t["platform"]
}) })
trains = sorted(trains, key=lambda t: int(t["scheduled"].replace(":", ""))) trains = sorted(trains, key=lambda t: int(t["scheduled"].replace(":", "")))