aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-01 15:05:57 +0100
committerGravatar jesopo2019-06-01 15:05:57 +0100
commit5077bad5224561a93d112d6b321508a604b25a89 (patch)
tree837e192caa5e9b1cfc32653f4fd71034aa72e5ab /src
parentavailable_capability returns `str` - fix type hint for this (diff)
signature
list()-ify `filter()` return, otherwise boolean checks against it are wrong
Diffstat (limited to 'src')
-rw-r--r--src/Timers.py3
1 files changed, 2 insertions, 1 deletions
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)