changeset 4349:5e69ec45d0c9

merged moin/1.7
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 28 Sep 2008 16:24:21 +0200
parents ae088388d645 (current diff) b3602f5e2038 (diff)
children 42048c969d90
files
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/server/standalone.py	Sun Sep 28 00:13:58 2008 +0200
+++ b/MoinMoin/script/server/standalone.py	Sun Sep 28 16:24:21 2008 +0200
@@ -67,9 +67,8 @@
         if self.args:
             self.parser.error("incorrect number of arguments")
 
-        thread_choices = ["ThreadPool", "Threading", "Forking", "Simple"]
-        serverClass = "ThreadPool"
         if self.options.serverClass:
+            thread_choices = ["ThreadPool", "Threading", "Forking", "Simple"]
             thread_choices2 = [x.upper() for x in thread_choices]
             thread_choice = self.options.serverClass.upper()
             try:
@@ -77,6 +76,8 @@
             except ValueError:
                 self.parser.error("invalid serverClass type")
             serverClass = thread_choices[serverClass_index]
+        else:
+            serverClass = None
 
         pidfile = "moin.pid"
         if self.options.pidfile:
@@ -116,7 +117,8 @@
                 Config.port = self.options.port
             if self.options.interface:
                 Config.interface = self.options.interface
-            Config.serverClass = serverClass + 'Server'
+            if serverClass:
+                Config.serverClass = serverClass + 'Server'
             if self.options.threadLimit:
                 Config.threadLimit = self.options.threadLimit
             if self.options.requestQueueSize:
--- a/MoinMoin/server/server_standalone.py	Sun Sep 28 00:13:58 2008 +0200
+++ b/MoinMoin/server/server_standalone.py	Sun Sep 28 16:24:21 2008 +0200
@@ -67,7 +67,9 @@
 
     def server_activate(self):
         BaseHTTPServer.HTTPServer.server_activate(self)
-        logging.info("Serving on %s:%d" % self.server_address)
+        logging.info("%s serving on %s:%d" % (self.__class__.__name__,
+                                              self.server_address[0],
+                                              self.server_address[1]))
 
     def serve_forever(self):
         """Handle one request at a time until we die """