From: Benjamin Peterson Date: Thu, 12 Feb 2009 04:17:04 +0000 (+0000) Subject: no need for this __bases__ trick anymore X-Git-Tag: v2.7a1~2050 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bb96feb60b80b580706e3a2c67db856382a530f;p=thirdparty%2FPython%2Fcpython.git no need for this __bases__ trick anymore --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index e108b29d337b..a2a7e66c8377 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,