From 88fbf3b5cf97b4659faa9048a3c9cc41cfca19f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Sun, 22 Nov 2015 14:27:05 +0100 Subject: [PATCH] remove broadcaster argument from __init__ --- telegram/boteventhandler.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/telegram/boteventhandler.py b/telegram/boteventhandler.py index b0e98399a..9acc521a6 100644 --- a/telegram/boteventhandler.py +++ b/telegram/boteventhandler.py @@ -41,24 +41,16 @@ class BotEventHandler: Args: token (str): The bots token given by the @BotFather base_url (Optional[str]): - broadcaster (Optional[Broadcaster]): Use present Broadcaster object. If - None, a new one will be created. workers (Optional[int]): Amount of threads in the thread pool for functions decorated with @run_async """ - def __init__(self, token, base_url=None, broadcaster=None, workers=4): - - if broadcaster: - self.bot = broadcaster.bot - self.update_queue = broadcaster.update_queue - self.broadcaster = broadcaster - else: - self.bot = Bot(token, base_url) - self.update_queue = Queue() - self.broadcaster = Broadcaster(self.bot, self.update_queue, - workers=workers) + def __init__(self, token, base_url=None, workers=4): + self.bot = Bot(token, base_url) + self.update_queue = Queue() + self.broadcaster = Broadcaster(self.bot, self.update_queue, + workers=workers) self.last_update_id = 0 self.logger = logging.getLogger(__name__) self.running = False