From bc2d48c473952247fe26c7058cb1a8ec746ff1d8 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 18 Mar 2014 12:01:37 +0100 Subject: Python 3: Replace types.ClassType with six.class_types --- paste/httpexceptions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'paste/httpexceptions.py') diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py index af60627..2c0c020 100644 --- a/paste/httpexceptions.py +++ b/paste/httpexceptions.py @@ -74,7 +74,6 @@ References: """ import six -import types from paste.wsgilib import catch_errors_app from paste.response import has_header, header_value, replace_header from paste.request import resolve_relative_url @@ -589,7 +588,7 @@ __all__ = ['HTTPException', 'HTTPRedirection', 'HTTPError' ] _exceptions = {} for name, value in six.iteritems(globals()): - if (isinstance(value, (type, types.ClassType)) and + if (isinstance(value, (type, six.class_types)) and issubclass(value, HTTPException) and value.code): _exceptions[value.code] = value -- cgit v1.2.1