From e924d492d0de773239780f73289a25a08d1b35f8 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Sun, 4 Dec 2016 13:49:53 +0000 Subject: [PATCH] Remember the filtered output, not the entire service list for !nrservice --- modules/nr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nr.py b/modules/nr.py index c127f936..2c8dc2bc 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -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"],