lib: Read bot's config file by ConfigParser.read_file method.

This was introduced in the refactor in
a8665aaac8.

The correct function taking an open file handle is read_file, not read().

Fixes #414.
This commit is contained in:
novokrest 2018-06-02 10:30:08 +03:00 committed by Tim Abbott
parent 363720e908
commit 229f62a483

View file

@ -199,7 +199,7 @@ class ExternalBotHandler(object):
config_parser = configparser.ConfigParser() config_parser = configparser.ConfigParser()
with open(self.bot_config_file) as conf: with open(self.bot_config_file) as conf:
try: try:
config_parser.read(conf) config_parser.read_file(conf)
except configparser.Error as e: except configparser.Error as e:
display_config_file_errors(str(e), self.bot_config_file) display_config_file_errors(str(e), self.bot_config_file)
sys.exit(1) sys.exit(1)