summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-04-09 17:57:38 (GMT)
committerGeorg Brandl <georg@python.org>2008-04-09 17:57:38 (GMT)
commit99bb5f3fef86bae6512e2bf18f85a42f05cf0e09 (patch)
tree2ce3f18b3609815eaaaf5d00e7bf84a6443fefb7
parent8f80a6a5f9c67876023a905535aba3f910b9e1fb (diff)
downloadcpython-99bb5f3fef86bae6512e2bf18f85a42f05cf0e09.zip
cpython-99bb5f3fef86bae6512e2bf18f85a42f05cf0e09.tar.gz
cpython-99bb5f3fef86bae6512e2bf18f85a42f05cf0e09.tar.bz2
#2585: initialize code attribute of HTTPError.
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 437a813..a20e552 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -159,7 +159,7 @@ class HTTPError(URLError, addinfourl):
# file object. If this happens, the simplest workaround is to
# not initialize the base classes.
if fp is not None:
- self.__super_init(fp, hdrs, url)
+ self.__super_init(fp, hdrs, url, code)
def __str__(self):
return 'HTTP Error %s: %s' % (self.code, self.msg)