commit | 99bb5f3fef86bae6512e2bf18f85a42f05cf0e09 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Wed Apr 09 17:57:38 2008 +0000 |
committer | Georg Brandl <georg@python.org> | Wed Apr 09 17:57:38 2008 +0000 |
tree | 2ce3f18b3609815eaaaf5d00e7bf84a6443fefb7 | |
parent | 8f80a6a5f9c67876023a905535aba3f910b9e1fb [diff] |
#2585: initialize code attribute of HTTPError.
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 @@ # 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)