changeset 4248:f35fdfdc1995

Fix missing attributes for standalone server config, remove reloader (crashes currently)
author Florian Krupicka <florian.krupicka@googlemail.com>
date Fri, 25 Jul 2008 13:19:25 +0200
parents ac631e6b2718
children b8ea98d74d8d
files MoinMoin/script/server/standalone.py MoinMoin/wsgiapp.py
diffstat 2 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/server/standalone.py	Thu Jul 24 22:29:10 2008 +0200
+++ b/MoinMoin/script/server/standalone.py	Fri Jul 25 13:19:25 2008 +0200
@@ -51,9 +51,9 @@
             help="Set file to store pid of moin daemon in. Default: moin.pid"
         )
         self.parser.add_option(
-            "--reload", dest="reload", action="store_true",
-            help="Reload the server if there are changes to any loaded python files"
-         )
+            "--debug", dest="debug", action="store_true",
+            help="Enable debug mode of server (show tracebacks)"
+        )
 
     def mainloop(self):
         # we don't expect non-option arguments
@@ -89,7 +89,7 @@
                     raise
 
             # intialize some defaults if missing
-            for option in ('docs', 'user', 'group', 'port', 'interface'):
+            for option in ('docs', 'user', 'group', 'port', 'interface', 'debug'):
                 if not hasattr(Config, option):
                     value = getattr(DefaultConfig, option)
                     setattr(Config, option, value)
@@ -103,6 +103,8 @@
                 Config.port = self.options.port
             if self.options.interface:
                 Config.interface = self.options.interface
+            if self.options.debug:
+                Config.debug = True
 
             if not hasattr(Config, 'docs'):
                 docs = os.path.join('wiki', 'htdocs')
@@ -110,8 +112,6 @@
                     docs = "/usr/share/moin/htdocs"
                 Config.docs = docs
 
-            Config.reload_server = self.options.reload
-
             if self.options.start:
                 daemon = Daemon('moin', pidfile, run_server, Config)
                 daemon.do_start()
@@ -126,4 +126,4 @@
     group = ''
     port = 8080
     interface = 'localhost'
-    reload_server = False
+    debug = False
--- a/MoinMoin/wsgiapp.py	Thu Jul 24 22:29:10 2008 +0200
+++ b/MoinMoin/wsgiapp.py	Fri Jul 25 13:19:25 2008 +0200
@@ -288,8 +288,7 @@
     app = SharedDataMiddleware(application, shared)
 
     params = {}
-    params['use_debugger'] = config.traceback_show
+    params['use_debugger'] = config.debug
     params['threaded'] = True
-    params['use_reloader'] = config.reload_server
 
     run_simple(config.interface, config.port, app, **params)