make make_app set app.debug as specified in config

This commit is contained in:
slice 2018-06-19 18:13:13 -07:00
parent efbcbafce4
commit c88148271d
No known key found for this signature in database
GPG Key ID: 1508C19D7436A26D
1 changed files with 3 additions and 1 deletions

4
run.py
View File

@ -22,8 +22,10 @@ log = Logger('litecord.boot')
def make_app(): def make_app():
app = Quart(__name__) app = Quart(__name__)
app.config.from_object(f'config.{config.MODE}') app.config.from_object(f'config.{config.MODE}')
is_debug = app.config.get('DEBUG', False)
app.debug = is_debug
if app.config['DEBUG']: if is_debug:
handler.level = logbook.DEBUG handler.level = logbook.DEBUG
return app return app