diff options
author | Michael W. Hudson <mwh@python.net> | 2002-05-20 14:30:06 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-05-20 14:30:06 (GMT) |
commit | 3704644acba4bce9aedfa9de169f632fe2a121ac (patch) | |
tree | d3b0febfcd7f16ad956ac08ae11a49b2aa6dca91 /Lib/urllib2.py | |
parent | 9c373061ad92f587adabd65ac8c0a25e4b1f39d1 (diff) | |
download | cpython-3704644acba4bce9aedfa9de169f632fe2a121ac.zip cpython-3704644acba4bce9aedfa9de169f632fe2a121ac.tar.gz cpython-3704644acba4bce9aedfa9de169f632fe2a121ac.tar.bz2 |
Use types.StringTypes instead of (types.StringType, types.UnicodeType) --
works better (at all!) in --disable-unicode builds.
Bugfix candidate, probably.
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py index cfb4f64..f5a2f32 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -303,7 +303,7 @@ class OpenerDirector: def open(self, fullurl, data=None): # accept a URL or a Request object - if isinstance(fullurl, (types.StringType, types.UnicodeType)): + if isinstance(fullurl, types.StringTypes): req = Request(fullurl, data) else: req = fullurl @@ -516,7 +516,7 @@ class HTTPPasswordMgr: def add_password(self, realm, uri, user, passwd): # uri could be a single URI or a sequence - if isinstance(uri, (types.StringType, types.UnicodeType)): + if isinstance(uri, types.StringTypes): uri = [uri] uri = tuple(map(self.reduce_uri, uri)) if not self.passwd.has_key(realm): |