Fix SyntaxError

This commit is contained in:
croneter 2018-11-06 11:20:20 +01:00
parent 3123af6426
commit 3414a0a688

View file

@ -217,7 +217,7 @@ class NonstoppingBackgroundWorker(BackgroundWorker):
class BackgroundThreader: class BackgroundThreader:
def __init__(self, name=None, worker, def __init__(self, name=None, worker=BackgroundWorker,
worker_count=int(utils.settings('syncThreadNumber'))): worker_count=int(utils.settings('syncThreadNumber'))):
self.name = name self.name = name
self._queue = MutablePriorityQueue() self._queue = MutablePriorityQueue()
@ -298,8 +298,8 @@ class ThreaderManager:
def __init__(self, worker=BackgroundWorker): def __init__(self, worker=BackgroundWorker):
self.index = 0 self.index = 0
self.abandoned = [] self.abandoned = []
self.threader = BackgroundThreader(name=str(self.index), self._workerhandler = worker
worker=worker) self.threader = BackgroundThreader(name=str(self.index), worker=worker)
def __getattr__(self, name): def __getattr__(self, name):
return getattr(self.threader, name) return getattr(self.threader, name)
@ -310,7 +310,8 @@ class ThreaderManager:
self.index += 1 self.index += 1
self.abandoned.append(self.threader.abort()) self.abandoned.append(self.threader.abort())
self.threader = BackgroundThreader(str(self.index)) self.threader = BackgroundThreader(name=str(self.index),
worker=self._workerhandler)
def shutdown(self): def shutdown(self):
self.threader.shutdown() self.threader.shutdown()