fix various bugs found by the 'prospector' static-analysis tool

This commit is contained in:
Andrew Scheller
2016-04-07 16:12:17 +01:00
parent 4f7e1f003e
commit 72ca075668
13 changed files with 33 additions and 34 deletions

View File

@@ -5,8 +5,6 @@ from __future__ import (
division,
)
import warnings
from time import sleep
from threading import Lock
from itertools import repeat, cycle, chain
@@ -194,7 +192,7 @@ class DigitalOutputDevice(OutputDevice):
def _blink_device(self, on_time, off_time, n):
iterable = repeat(0) if n is None else repeat(0, n)
for i in iterable:
for _ in iterable:
self._write(True)
if self._blink_thread.stopping.wait(on_time):
break