py3k: Handle non-callable controllers in routes better

--HG--
branch : py3k
master
Dustin C. Hatch 2012-11-03 11:26:01 -05:00
parent 6c034b88d3
commit fa97bd7b03
1 changed files with 1 additions and 1 deletions

View File

@ -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))