changeset 4519:74e850a410ec

web.flup_frontend: fixed missing definition of server_types.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 31 Jan 2009 00:59:50 +0100
parents c6fa175c7b62
children 7f17aad0ab89
files MoinMoin/web/flup_frontend.py
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/flup_frontend.py	Sat Jan 31 00:57:33 2009 +0100
+++ b/MoinMoin/web/flup_frontend.py	Sat Jan 31 00:59:50 2009 +0100
@@ -58,19 +58,23 @@
 
         def run_server(self, application, options):
             server_type = options.server_type
+            # ToDo solve server_types mismatch of definitions
+            server_types = ['single', 'threaded']
 
             if not server_type:
-                if 'single' in self.server_types:
+                if 'single' in server_types:
                     server_type = (options.port and 'threaded') or 'single'
                 else:
                     server_type = 'threaded'
 
-            if server_type not in self.server_types:
+            if server_type not in server_types:
                 raise TypeError("Unknown server type '%s'" % options.server_type)
 
             multi = server_type in ('threaded', 'forking')
-
-            mod = self.server_types[server_type]
+            # ToDo find a better solution, there are more servers available
+            server_types = {'single': 'flup.server.fcgi_single',
+                            'threaded': 'flup.server.fcgi'}
+            mod = server_types[server_type]
             mod = __import__(mod, fromlist=['WSGIServer'])
             WSGIServer = mod.WSGIServer