From 5077bad5224561a93d112d6b321508a604b25a89 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 1 Jun 2019 15:05:57 +0100 Subject: list()-ify `filter()` return, otherwise boolean checks against it are wrong --- src/Timers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Timers.py b/src/Timers.py index 53865181..88cceeed 100644 --- a/src/Timers.py +++ b/src/Timers.py @@ -83,7 +83,8 @@ class Timers(object): self.timers.append(timer) def next(self) -> typing.Optional[float]: - times = filter(None, [timer.time_left() for timer in self.get_timers()]) + times = list(filter(None, + [timer.time_left() for timer in self.get_timers()])) if not times: return None return max(min(times), 0) -- cgit v1.3.1-10-gc9f91