Remember the filtered output, not the entire service list for !nrservice

This commit is contained in:
Evelyn 2016-12-04 13:49:53 +00:00
parent 60a728f959
commit e924d492d0

View file

@ -69,7 +69,6 @@ class Module(object):
trains = sorted(trains, key=lambda t: int(t["scheduled"].replace(":", "")))
self.result_map[event["target"].id] = trains
trains_filtered = []
train_dest_plat = []
@ -79,6 +78,8 @@ class Module(object):
train_dest_plat.append((train["dest_name"] + train["via"], train["platform"]))
trains_filtered.append(train)
self.result_map[event["target"].id] = trains_filtered
trains_string = ", ".join(["%s (plat %s, %s%s%s)" % (t["dest_via"], t["platform"],
Utils.color(Utils.COLOR_GREEN if t["on_time"] else Utils.COLOR_RED),
t["time"],