921222f48d5d

web: use --debug to turn on debug mode for the server
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 12 Jun 2010 14:17:45 -0400
parents f541cc7321a9
children 84af7bc5ab60
branches/tags (none)
files review/extension_ui.py review/messages.py review/web_ui.py

Changes

--- a/review/extension_ui.py	Sat Jun 12 00:33:05 2010 -0400
+++ b/review/extension_ui.py	Sat Jun 12 14:17:45 2010 -0400
@@ -19,11 +19,8 @@
     port = int(opts.pop('port'))
 
     import web_ui
-    web_ui.load_interface(
-        ui, repo, read_only=read_only,
-        address=address, port=port,
-        open=False
-    )
+    web_ui.load_interface(ui, repo, read_only=read_only,
+                          address=address, port=port, open=False)
 
 def _init_command(ui, repo, **opts):
     ui.note(messages.INIT_START)
--- a/review/messages.py	Sat Jun 12 00:33:05 2010 -0400
+++ b/review/messages.py	Sat Jun 12 14:17:45 2010 -0400
@@ -110,7 +110,7 @@
 DELETE_SIGNOFF = """Remove sign off on changeset %s"""
 
 WEB_START = """\
-starting CherryPy web server
+starting web server
 """
 
 CHECK_SUCCESS = """\
--- a/review/web_ui.py	Sat Jun 12 00:33:05 2010 -0400
+++ b/review/web_ui.py	Sat Jun 12 14:17:45 2010 -0400
@@ -132,7 +132,8 @@
     return redirect('/')
 
 
-def load_interface(ui, repo, read_only=False, open=False, address='127.0.0.1', port=8080):
+def load_interface(ui, repo, read_only=False, open=False,
+        address='127.0.0.1', port=8080):
     if open:
         import webbrowser
         webbrowser.open('http://localhost:%d/' % port)
@@ -141,5 +142,5 @@
     datastore = api.ReviewDatastore(ui, repo)
     site_read_only = read_only
 
-    app.debug = True
+    app.debug = ui.debugflag
     app.run(host=address, port=port)