Auto setting conf.debug=True if env var BOT_DEV is set

This commit is contained in:
mrhanky 2017-08-22 18:10:58 +02:00
parent 4c02227c4b
commit f341503101
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -39,6 +39,9 @@ class Bot(irc3.IrcBot):
with open(cfg_file, 'r') as fp: with open(cfg_file, 'r') as fp:
conf = json.load(fp) conf = json.load(fp)
if cls.DEV:
conf['debug'] = True
bot = cls.from_config(conf) bot = cls.from_config(conf)
bot.cfg_file = cfg_file bot.cfg_file = cfg_file
bot.env_file = env_file bot.env_file = env_file