open_http also had the 'data is None' test backwards. don't call with the
extra argument if data is None.
This commit is contained in:
parent
dc12ec8ca0
commit
29aab7582f
|
@ -276,10 +276,9 @@ class URLopener:
|
|||
return addinfourl(fp, headers, "http:" + url)
|
||||
else:
|
||||
if data is None:
|
||||
return self.http_error(url, fp, errcode, errmsg,
|
||||
headers, data)
|
||||
else:
|
||||
return self.http_error(url, fp, errcode, errmsg, headers)
|
||||
else:
|
||||
return self.http_error(url, fp, errcode, errmsg, headers, data)
|
||||
|
||||
# Handle http errors.
|
||||
# Derived class can override this, or provide specific handlers
|
||||
|
|
Loading…
Reference in New Issue