From 229f62a483501572884aeb8a39e8992f80758c34 Mon Sep 17 00:00:00 2001 From: novokrest Date: Sat, 2 Jun 2018 10:30:08 +0300 Subject: [PATCH] lib: Read bot's config file by `ConfigParser.read_file` method. This was introduced in the refactor in a8665aaac89ce703e708d2d456131ab978a3f7e6. The correct function taking an open file handle is read_file, not read(). Fixes #414. --- zulip_bots/zulip_bots/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip_bots/zulip_bots/lib.py b/zulip_bots/zulip_bots/lib.py index 8faa2ff..d91a846 100644 --- a/zulip_bots/zulip_bots/lib.py +++ b/zulip_bots/zulip_bots/lib.py @@ -199,7 +199,7 @@ class ExternalBotHandler(object): config_parser = configparser.ConfigParser() with open(self.bot_config_file) as conf: try: - config_parser.read(conf) + config_parser.read_file(conf) except configparser.Error as e: display_config_file_errors(str(e), self.bot_config_file) sys.exit(1)