From: W. Trevor King Date: Mon, 22 Sep 2014 13:57:10 +0000 (-0700) Subject: nmhive.py: Add --debug option X-Git-Tag: v0.1.0~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=919846ad3e6994a8a954128b170a6bbaa1884509;p=nmhive.git nmhive.py: Add --debug option I'd removed a hardcoded 'app.debug = True' in bdbfab1f (nmhive.py: Use notmuch behind GET /tags, 2014-09-21) because it conflicted with a global, read/write lock. However, in a98096f1 (nmhive.py: Use per-request database connections, 2014-09-21) I dropped the global lock, so enabling debuging is feasible again. --- diff --git a/nmhive.py b/nmhive.py index c500d9c..b05aa89 100755 --- a/nmhive.py +++ b/nmhive.py @@ -112,7 +112,11 @@ if __name__ == '__main__': parser.add_argument( '-p', '--port', type=int, default=5000, help='The port to listen on.') + parser.add_argument( + '-d', '--debug', type=bool, default=False, + help='Run Flask in debug mode (e.g. show errors).') args = parser.parse_args() + app.debug = args.debug app.run(host=args.host, port=args.port)