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:
Guido van Rossum 1999-03-09 19:31:21 +00:00
parent dc12ec8ca0
commit 29aab7582f
1 changed files with 2 additions and 3 deletions

View File

@ -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