summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-03-09 19:31:21 (GMT)
committerGuido van Rossum <guido@python.org>1999-03-09 19:31:21 (GMT)
commit29aab7582f635e7041631b6e540c3b454c37450e (patch)
tree057e058147fe270d5b06936af5d06d9002526a62 /Lib
parentdc12ec8ca0d9407c34834ae7b90dde526a9f5aa7 (diff)
downloadcpython-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')
-rw-r--r--Lib/urllib.py5
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