# HG changeset patch # User Ludovic Chabant # Date 1391012326 28800 # Node ID 528778a7421f2a577f16eb7f9b2c422882db1e14 # Parent c50af0a133b668482c87f5f2c68911755fc4c9d1 Less confusing debug vs. production difference. diff -r c50af0a133b6 -r 528778a7421f wikked/commands/web.py --- a/wikked/commands/web.py Tue Jan 28 21:45:10 2014 -0800 +++ b/wikked/commands/web.py Wed Jan 29 08:18:46 2014 -0800 @@ -20,9 +20,6 @@ parser.add_argument('--port', help="The port to use", default=5000) - parser.add_argument('--production', - help="Don't enable the debugger or reloader", - action='store_true') def run(self, ctx): # Change working directory because the Flask app can currently @@ -32,19 +29,14 @@ from wikked.web import app app.wiki_params = ctx.params - if bool(app.config.get('UPDATE_WIKI_ON_START')): ctx.wiki.update() - use_dbg_and_rl = not ctx.args.production - - if ctx.args.debug: - app.config['DEBUG'] = True - + debug_mode = ctx.args.debug or app.config.get('DEBUG', False) app.run( host=ctx.args.host, port=ctx.args.port, - debug=app.config.get('DEBUG', True), - use_debugger=use_dbg_and_rl, - use_reloader=use_dbg_and_rl) + debug=debug_mode, + use_debugger=debug_mode, + use_reloader=debug_mode)