diff options
author | Guido van Rossum <guido@python.org> | 1999-03-09 19:31:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-03-09 19:31:21 (GMT) |
commit | 29aab7582f635e7041631b6e540c3b454c37450e (patch) | |
tree | 057e058147fe270d5b06936af5d06d9002526a62 /Lib/urllib.py | |
parent | dc12ec8ca0d9407c34834ae7b90dde526a9f5aa7 (diff) | |
download | cpython-29aab7582f635e7041631b6e540c3b454c37450e.zip cpython-29aab7582f635e7041631b6e540c3b454c37450e.tar.gz cpython-29aab7582f635e7041631b6e540c3b454c37450e.tar.bz2 |
open_http also had the 'data is None' test backwards. don't call with the
extra argument if data is None.
Diffstat (limited to 'Lib/urllib.py')
-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 |