From fa97bd7b0335dbb8274dab81958b6ad8ddc2f724 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 3 Nov 2012 11:26:01 -0500 Subject: [PATCH] py3k: Handle non-callable controllers in routes better --HG-- branch : py3k --- src/milla/dispatch/routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/milla/dispatch/routing.py b/src/milla/dispatch/routing.py index c350e49..ff4702f 100644 --- a/src/milla/dispatch/routing.py +++ b/src/milla/dispatch/routing.py @@ -205,7 +205,7 @@ class Router(object): module ``some.module``. ''' - if isinstance(controller, basestring): + if not hasattr(controller, '__call__'): controller = self._import_controller(controller) self.routes.append((self._compile_template(template), controller, vars))