summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-02-12 04:17:04 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-02-12 04:17:04 (GMT)
commit4bb96feb60b80b580706e3a2c67db856382a530f (patch)
tree078a844508a857476d17fbc0022c1739ca1446eb /Lib
parent1312b4bcfdb85577b317f0024efe271aee18856b (diff)
downloadcpython-4bb96feb60b80b580706e3a2c67db856382a530f.zip
cpython-4bb96feb60b80b580706e3a2c67db856382a530f.tar.gz
cpython-4bb96feb60b80b580706e3a2c67db856382a530f.tar.bz2
no need for this __bases__ trick anymore
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,