Robert Brewer  committed c647e69

Fix for #1045 (CherryPy should support uninstantiated classes as controllers, and instantiate them on dispatching)

  • Participants
  • Parent commits 3a0794e
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/

 import string
+import types
 import cherrypy
             controller = result.get('controller')
             controller = self.controllers.get(controller, controller)
             if controller:
+                if isinstance(controller, (type, types.ClassType)):
+                    controller = controller()
                 # Get config from the controller.
                 if hasattr(controller, "_cp_config"):