Skip to content

Commit 2d996c0

Browse files
committed
Fix typo (missing "req." prefix on error_302_dict) found by Neil
Norwitz's PyChecker.
1 parent b8b45ea commit 2d996c0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/urllib2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,8 @@ def http_error_302(self, req, fp, code, msg, headers):
447447
new = Request(newurl, req.get_data())
448448
new.error_302_dict = {}
449449
if hasattr(req, 'error_302_dict'):
450-
if len(error_302_dict)>10 or req.error_302_dict.has_key(newurl):
450+
if len(req.error_302_dict)>10 or \
451+
req.error_302_dict.has_key(newurl):
451452
raise HTTPError(req.get_full_url(), code,
452453
self.inf_msg + msg, headers)
453454
new.error_302_dict.update(req.error_302_dict)

0 commit comments

Comments
 (0)