diff options
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 3c8bc0f..7319bd6 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -290,12 +290,11 @@ class URLopener: if hasattr(self, name): method = getattr(self, name) if data is None: - result = method(url, fp, errcode, errmsg, headers, data) - else: result = method(url, fp, errcode, errmsg, headers) + else: + result = method(url, fp, errcode, errmsg, headers, data) if result: return result - return self.http_error_default( - url, fp, errcode, errmsg, headers) + return self.http_error_default(url, fp, errcode, errmsg, headers) # Default http error handler: close the connection and raises IOError def http_error_default(self, url, fp, errcode, errmsg, headers): |