Commits

Robert Brewer committed 3a0794e

Fix for #1046 (Dispatching via RoutesDispatcher should not blow up on anonymous routes (routes with no name))

Comments (0)

Files changed (1)

cherrypy/_cpdispatch.py

         
         handler = None
         if result:
-            controller = result.get('controller', None)
-            controller = self.controllers.get(controller)
+            controller = result.get('controller')
+            controller = self.controllers.get(controller, controller)
             if controller:
                 # Get config from the controller.
                 if hasattr(controller, "_cp_config"):