From b35a64ae482d90037998a63d81f45fd81652fa41 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Mon, 23 Oct 2017 16:18:10 +0100 Subject: NR: Don't assume associations present in eagle output --- modules/nr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/nr.py b/modules/nr.py index 1e661a9a..e28aa707 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -411,7 +411,7 @@ class Module(object): "times": self.process(station["dolphin_times"]), "platform": station["platform"] } - for assoc in station["associations"]: + for assoc in station["associations"] or []: parsed["divide_summary"] += ", " if parsed["divide_summary"] else "" parsed["divide_summary"] += {"NP": "Next service is %s at ", "JJ": "Joins %s at ", "VV": "Detaches as %s at "}[assoc["category"]] % assoc["uid_assoc"] stations.append(parsed) -- cgit v1.3.1-10-gc9f91