From: Michael Tremer Date: Thu, 12 Jul 2018 17:21:59 +0000 (+0100) Subject: Fix command line switch to enable debug mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=026ebaefad2bfae06f3ebc4c4a9b49062e9107db;p=ipfire.org.git Fix command line switch to enable debug mode Signed-off-by: Michael Tremer --- diff --git a/src/backend/__init__.py b/src/backend/__init__.py index a6aa46b3..ad5141fd 100644 --- a/src/backend/__init__.py +++ b/src/backend/__init__.py @@ -1,9 +1,3 @@ #!/usr/bin/python -from tornado.options import define, options, parse_command_line - -# Command line options -define("debug", default=False, help="Run in debug mode", type=bool) -parse_command_line() - from base import Backend diff --git a/src/scripts/ipfire.org-webapp.in b/src/scripts/ipfire.org-webapp.in index 8b1b02a9..d5e238aa 100755 --- a/src/scripts/ipfire.org-webapp.in +++ b/src/scripts/ipfire.org-webapp.in @@ -3,6 +3,7 @@ import tornado.ioloop import tornado.options +tornado.options.define("debug", type=bool, default=False, help="Enable debug mode") tornado.options.define("port", type=int, default=8001, help="Port to listen on") from ipfire.web import Application @@ -11,7 +12,8 @@ def run(): tornado.options.parse_command_line() # Initialize application - app = Application("@configsdir@/@PACKAGE_NAME@.conf") + app = Application("@configsdir@/@PACKAGE_NAME@.conf", + debug=tornado.options.options.debug) app.listen(tornado.options.options.port) # Launch IOLoop