mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix queue default value. #86
This commit is contained in:
parent
07960fe348
commit
bf9939d40e
@ -18,10 +18,12 @@ from telebot import logger
|
|||||||
class WorkerThread(threading.Thread):
|
class WorkerThread(threading.Thread):
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
def __init__(self, exception_callback=None, queue=Queue.Queue(), name=None):
|
def __init__(self, exception_callback=None, queue=None, name=None):
|
||||||
if not name:
|
if not name:
|
||||||
name = "WorkerThread{0}".format(self.__class__.count + 1)
|
name = "WorkerThread{0}".format(self.__class__.count + 1)
|
||||||
self.__class__.count += 1
|
self.__class__.count += 1
|
||||||
|
if not queue:
|
||||||
|
queue = Queue.Queue()
|
||||||
|
|
||||||
threading.Thread.__init__(self, name=name)
|
threading.Thread.__init__(self, name=name)
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
|
Loading…
Reference in New Issue
Block a user