summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index e108b29..a2a7e66 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -441,7 +441,7 @@ def build_opener(*handlers):
"""
import types
def isclass(obj):
- return isinstance(obj, types.ClassType) or hasattr(obj, "__bases__")
+ return isinstance(obj, (types.ClassType, type))
opener = OpenerDirector()
default_classes = [ProxyHandler, UnknownHandler, HTTPHandler,