Commit 29aab758 authored by Guido van Rossum's avatar Guido van Rossum

open_http also had the 'data is None' test backwards. don't call with the

extra argument if data is None.
parent dc12ec8c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment