From: Guido van Rossum Date: Tue, 9 Mar 1999 19:31:21 +0000 (+0000) Subject: open_http also had the 'data is None' test backwards. don't call with the X-Git-Tag: v1.5.2c1~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29aab7582f635e7041631b6e540c3b454c37450e;p=python open_http also had the 'data is None' test backwards. don't call with the extra argument if data is None. --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 7319bd623f..ceacc61303 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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