WikklyText A wikitext server and rendering library


files/feed-icon-14x14.png Recently Edited Valid XHTML 1.0 Strict
Patch: cherrypy-3.1.0rc1-console-handler edit
frank, 12 June 2008 (created 12 June 2008)
This patch is needed to use CherryPy 3.1.0rc1 behind Apache with mod_python:
diff -u -r CherryPy-3.1.0rc1/cherrypy/__init__.py fm-CherryPy-3.1.0rc1/cherrypy/__init__.py
--- CherryPy-3.1.0rc1/cherrypy/__init__.py    2008-05-17 15:34:25.000000000 -0500
+++ fm-CherryPy-3.1.0rc1/cherrypy/__init__.py    2008-06-12 11:33:48.467036800 -0500
@@ -181,7 +181,8 @@
     del win32
 except ImportError:
     engine = process.bus
-
+    _console_control_handler = None
+    
 
 # Timeout monitor
 class _TimeoutMonitor(process.plugins.Monitor):
diff -u -r CherryPy-3.1.0rc1/cherrypy/_cpmodpy.py fm-CherryPy-3.1.0rc1/cherrypy/_cpmodpy.py
--- CherryPy-3.1.0rc1/cherrypy/_cpmodpy.py    2008-05-17 15:34:26.000000000 -0500
+++ fm-CherryPy-3.1.0rc1/cherrypy/_cpmodpy.py    2008-06-12 11:34:11.149164400 -0500
@@ -97,7 +97,8 @@
                             "tools.ignore_headers.headers": ['Range'],
                             })
     
-    cherrypy._console_control_handler.unsubscribe()
+    if cherrypy._console_control_handler is not None:
+        cherrypy._console_control_handler.unsubscribe()
     cherrypy.engine.autoreload.unsubscribe()
     cherrypy.server.unsubscribe()