diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-02-12 04:17:04 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-02-12 04:17:04 (GMT) |
commit | 4bb96feb60b80b580706e3a2c67db856382a530f (patch) | |
tree | 078a844508a857476d17fbc0022c1739ca1446eb /Lib/urllib2.py | |
parent | 1312b4bcfdb85577b317f0024efe271aee18856b (diff) | |
download | cpython-4bb96feb60b80b580706e3a2c67db856382a530f.zip cpython-4bb96feb60b80b580706e3a2c67db856382a530f.tar.gz cpython-4bb96feb60b80b580706e3a2c67db856382a530f.tar.bz2 |
no need for this __bases__ trick anymore
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 2 |
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, |