]> granicus.if.org Git - python/commitdiff
#2585: initialize code attribute of HTTPError.
authorGeorg Brandl <georg@python.org>
Wed, 9 Apr 2008 17:57:38 +0000 (17:57 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 9 Apr 2008 17:57:38 +0000 (17:57 +0000)
Lib/urllib2.py

index 437a813696dc5c9bef5a58146b37cb1796eb434a..a20e5522c69666e610f9f99737b1058070f65ea4 100644 (file)
@@ -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)