From 29aab7582f635e7041631b6e540c3b454c37450e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 9 Mar 1999 19:31:21 +0000 Subject: open_http also had the 'data is None' test backwards. don't call with the extra argument if data is None. --- Lib/urllib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/urllib.py b/Lib/urllib.py index 7319bd6..ceacc61 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 -- cgit v0.12