From e216a2927782b1e255c5b96ab275b21fdd698beb Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Tue, 21 Nov 2017 11:26:12 -0800 Subject: [PATCH] minor: Extract client_name local var. --- zulip_bots/zulip_bots/lib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zulip_bots/zulip_bots/lib.py b/zulip_bots/zulip_bots/lib.py index 8c9104f..f845686 100644 --- a/zulip_bots/zulip_bots/lib.py +++ b/zulip_bots/zulip_bots/lib.py @@ -216,7 +216,10 @@ def run_message_handler_for_bot(lib_module, quiet, config_file, bot_name): } bot_details.update(getattr(lib_module.handler_class, 'META', {})) # Make sure you set up your ~/.zuliprc - client = Client(config_file=config_file, client="Zulip{}Bot".format(bot_name.capitalize())) + + client_name = "Zulip{}Bot".format(bot_name.capitalize()) + client = Client(config_file=config_file, client=client_name) + bot_dir = os.path.dirname(lib_module.__file__) restricted_client = ExternalBotHandler(client, bot_dir, bot_details)