NR: Don't assume associations present in eagle output

This commit is contained in:
Evelyn 2017-10-23 16:18:10 +01:00
parent fa8f7da166
commit b35a64ae48

View file

@ -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)