1
0
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:
eternnoir 2015-10-13 13:05:38 +08:00
parent 07960fe348
commit bf9939d40e

View File

@ -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