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:
parent
363720e908
commit
229f62a483
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue