Commits

Anonymous committed ee95573

Only call the _console_control_handler unsubscribe if the attribute is available.

Comments (0)

Files changed (1)

cherrypy/_cpmodpy.py

                             "tools.ignore_headers.headers": ['Range'],
                             })
     
-    cherrypy._console_control_handler.unsubscribe()
+    if hasattr(cherrypy, '_console_control_handler'):
+        cherrypy._console_control_handler.unsubscribe()
     cherrypy.engine.autoreload.unsubscribe()
     cherrypy.server.unsubscribe()