From cb41b9be37866d501f16f2743a49ee4f2ce6c2b3 Mon Sep 17 00:00:00 2001 From: Evelyn Date: Tue, 20 Dec 2016 14:11:06 +0000 Subject: [PATCH] NR: Remove unused span/countdown code --- modules/nr.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/modules/nr.py b/modules/nr.py index cb5d4211..95c2a85b 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -29,25 +29,6 @@ class Module(object): help="Get information for a given headcode/UID/RID (Powered by NRE)", usage="") - def time_compare(self, one, two): - return (one.hour - two.hour) * 60 + (one.minute - two.minute) - - def span(self, gen, std, etd, human=True): - expected = std - if etd.replace(":", "").isdigit(): - expected = etd - elif etd != "On time": - return etd - - time_due = datetime.datetime.strptime(expected, "%H:%M") - time_until = self.time_compare(time_due.time(), gen.time()) - - if time_until == 0: human_time = "due" - else: human_time = "in %s min" % time_until - - if human: return human_time - else: return time_until - def arrivals(self, event): colours = [Utils.COLOR_LIGHTBLUE, Utils.COLOR_GREEN, Utils.COLOR_RED]