diff options
author | Michael Weiser <michael.weiser@gmx.de> | 2019-04-08 15:22:26 +0000 |
---|---|---|
committer | Michael Weiser <michael.weiser@gmx.de> | 2019-04-08 16:51:18 +0000 |
commit | 69a57f4b133f19a27fc1788f3ba035501bc6919f (patch) | |
tree | 3581553aae7cdc46cb12945c0a2f3f013f0d6b27 | |
parent | a383e1b7d9e816991a36ba23e5d22f85d2a6d387 (diff) |
Fix integer division for python3
python3 says:
TypeError: 'float' object cannot be interpreted as an integer
because division always returns a float there but range() expects an
integer. Use // for explicit integer division to work around that.
-rw-r--r-- | peekaboo/queuing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/peekaboo/queuing.py b/peekaboo/queuing.py index c4cedd7..24b279b 100644 --- a/peekaboo/queuing.py +++ b/peekaboo/queuing.py @@ -294,7 +294,7 @@ class JobQueue: # wait for workers to end interval = 1 - for attempt in range(1, timeout / interval + 1): + for attempt in range(1, timeout // interval + 1): still_running = [] for worker in self.workers: if worker.running: |