changeset 4520:7f17aad0ab89

web.frontend: fixed FrontEnd.run for CGI
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 31 Jan 2009 01:15:35 +0100
parents 74e850a410ec
children 64e3ae35a5eb
files MoinMoin/web/frontend.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/frontend.py	Sat Jan 31 00:59:50 2009 +0100
+++ b/MoinMoin/web/frontend.py	Sat Jan 31 01:15:35 2009 +0100
@@ -37,8 +37,12 @@
         else:
             application = make_application()
         try:
-            from MoinMoin.web.flup_frontend import FlupFrontEnd
-            return FlupFrontEnd().run_server(application, options)
+            if self.__class__.__name__ == "CGIFrontEnd":
+                from MoinMoin.web._fallback_cgi import WSGIServer
+                return WSGIServer(application).run()
+            else:
+                from MoinMoin.web.flup_frontend import FlupFrontEnd
+                return FlupFrontEnd().run_server(application, options)
         except:
             logging.error('Error while running %s', self.__class__.__name__)
             raise