]> git.ipfire.org Git - pbs.git/commitdiff
Make debug mode configurable.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Feb 2013 14:49:41 +0000 (15:49 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Feb 2013 14:49:41 +0000 (15:49 +0100)
Default is false.

web/__init__.py

index 4e24902d45bfce1dfd237e5e8955fec5bbda00e4..1315dfe25ba5dc996a531a2d8cca7293b389b880 100644 (file)
@@ -16,6 +16,7 @@ import handlers_api
 BASEDIR = os.path.join(os.path.dirname(__file__), "..", "data")
 
 # Enable logging
+tornado.options.define("debug", default=False, help="Run in debug mode", type=bool)
 tornado.options.parse_command_line()
 
 class Application(tornado.web.Application):
@@ -23,7 +24,7 @@ class Application(tornado.web.Application):
                self.__pakfire = None
 
                settings = dict(
-                       debug = True,
+                       debug = tornado.options.options.debug,
                        gzip  = True,
                        login_url = "/login",
                        template_path = os.path.join(BASEDIR, "templates"),