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

@@ -8,11 +8,6 @@ str = type('')
from threading import Thread, Event
from .exc import (
GPIOBadQueueLen,
GPIOBadSampleWait,
)
_THREADS = set()
def _threads_shutdown():
@@ -22,7 +17,9 @@ def _threads_shutdown():
class GPIOThread(Thread):
def __init__(self, group=None, target=None, name=None, args=(), kwargs={}):
def __init__(self, group=None, target=None, name=None, args=(), kwargs=None):
if kwargs is None:
kwargs = {}
self.stopping = Event()
super(GPIOThread, self).__init__(group, target, name, args, kwargs)
self.daemon = True