]> git.ipfire.org Git - ipfire.org.git/commitdiff
Fix command line switch to enable debug mode
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Jul 2018 17:21:59 +0000 (18:21 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Jul 2018 17:21:59 +0000 (18:21 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/__init__.py
src/scripts/ipfire.org-webapp.in

index a6aa46b32d7b6fd1886e6a5c37b692b7f1f7993c..ad5141fd6c9af8e97eff513617976c4093a392e9 100644 (file)
@@ -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
index 8b1b02a903e162c2b8d52cef9b153f43274daa92..d5e238aa22d722bc660de895dd1854142b720476 100755 (executable)
@@ -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