Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[svn] more robust class test on the controller object

--HG--
branch : trunk
  • Loading branch information...
commit 74aa7a1140d3c76d5e41ff96dede1f80b47c0746 1 parent 02fa8b9
pjenvey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 pylons/wsgiapp.py
View
4 pylons/wsgiapp.py
@@ -9,7 +9,6 @@
import re
import inspect
import urllib
-from types import ClassType
import paste.wsgiwrappers
import paste.httpexceptions as httpexceptions
@@ -170,7 +169,8 @@ def dispatch(self, controller, environ, start_response):
match[k] = urllib.unquote_plus(v)
# Older subclass of Controller
- if type(controller) == ClassType and not issubclass(controller, WSGIController) and issubclass(controller, Controller):
+ if inspect.isclass(controller) and not issubclass(controller, WSGIController) and \
+ issubclass(controller, Controller):
controller = controller()
controller.start_response = start_response
Please sign in to comment.
Something went wrong with that request. Please try again.