diff options
| author | 2019-06-01 15:05:57 +0100 | |
|---|---|---|
| committer | 2019-06-01 15:05:57 +0100 | |
| commit | 5077bad5224561a93d112d6b321508a604b25a89 (patch) | |
| tree | 837e192caa5e9b1cfc32653f4fd71034aa72e5ab | |
| parent | available_capability returns `str` - fix type hint for this (diff) | |
| signature | ||
list()-ify `filter()` return, otherwise boolean checks against it are wrong
| -rw-r--r-- | src/Timers.py | 3 |
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) |
