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 84c1827291
commit 6e44c1bb88
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))