[Python-checkins] r62246 - python/trunk/Lib/urllib2.py

georg.brandl python-checkins at python.org
Wed Apr 9 19:57:38 CEST 2008


Author: georg.brandl
Date: Wed Apr  9 19:57:38 2008
New Revision: 62246

Modified:
   python/trunk/Lib/urllib2.py
Log:
#2585: initialize code attribute of HTTPError.


Modified: python/trunk/Lib/urllib2.py
==============================================================================
--- python/trunk/Lib/urllib2.py	(original)
+++ python/trunk/Lib/urllib2.py	Wed Apr  9 19:57:38 2008
@@ -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)


More information about the Python-checkins mailing list