bots: Check existance of config file in get_config_info().

This commit is contained in:
Robert Hönig
2017-06-15 11:11:28 +02:00
committed by Tim Abbott
parent f4aec8fedd
commit 6b0aa7f345
2 changed files with 1 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ class BotHandlerApi(object):
our_dir, '..', 'bots', bot_name, bot_name + '.conf'))
section = section or bot_name
config = configparser.ConfigParser()
config.read(conf_file_path)
config.readfp(open(conf_file_path))
return dict(config.items(section))