diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 5ca5452a4ff..042f2ba6f2c 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -447,7 +447,8 @@ def http_error_302(self, req, fp, code, msg, headers): new = Request(newurl, req.get_data()) new.error_302_dict = {} if hasattr(req, 'error_302_dict'): - if len(error_302_dict)>10 or req.error_302_dict.has_key(newurl): + if len(req.error_302_dict)>10 or \ + req.error_302_dict.has_key(newurl): raise HTTPError(req.get_full_url(), code, self.inf_msg + msg, headers) new.error_302_dict.update(req.error_302_dict)