From 8d74905481196b9d20be177bf18a32a9acb1b69c Mon Sep 17 00:00:00 2001 From: Evelyn Date: Sun, 9 Oct 2016 09:01:06 +0100 Subject: [PATCH] nrtrains now doesn't break if a platform isn't known --- modules/nr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nr.py b/modules/nr.py index ce7a9682..06c36f82 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -55,7 +55,7 @@ class Module(object): # "via": t["destination"][0][0]["via"], "" "via": "", - "platform": t["platform"] + "platform": "?" if not "platform" in t else t["platform"] }) trains = sorted(trains, key=lambda t: int(t["scheduled"].replace(":", "")))