Index: Lib/urllib2.py =================================================================== --- Lib/urllib2.py (revision 62242) +++ Lib/urllib2.py (working copy) @@ -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)