From 62924b6eaeb6e0cb69dcf1b42ee730c9094297e2 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: May 20 2017 15:35:36 +0000 Subject: Make no-debug a runserver option Signed-off-by: Patrick Uiterwijk --- diff --git a/runserver.py b/runserver.py index b774b75..2fd8daf 100755 --- a/runserver.py +++ b/runserver.py @@ -30,6 +30,9 @@ parser.add_argument( '--port', '-p', default=5000, help='Port for the Pagure to run on.') parser.add_argument( + '--no-debug', action='store_true', + help='Disable debugging') +parser.add_argument( '--host', default="127.0.0.1", help='Hostname to listen on. When set to 0.0.0.0 the server is available ' 'externally. Defaults to 127.0.0.1 making the it only visible on localhost') @@ -54,5 +57,5 @@ if args.profile: APP.config['PROFILE'] = True APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30]) -APP.debug = True +APP.debug = not args.no_debug APP.run(host=args.host, port=int(args.port))