diff options
-rw-r--r-- | Lib/urllib.py | 5 |
1 files 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 |