New submission from djc <[EMAIL PROTECTED]>: [EMAIL PROTECTED] tests $ python2.6 Python 2.6a2+ (trunk, Apr 4 2008, 20:21:45) [GCC 4.1.2 20070214 ( (gdc 0.24, using dmd 1.020)) (Gentoo 4.1.2 p1.0.2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> try: ... urllib2.urlopen('http://example.com/weird') ... except urllib2.HTTPError, inst: ... print inst.code ... None >>>
urllib.addinfourl.__init__() was changed in r60133 to set self.code. Unfortunately, this overrides HTTPError.code, which is probably not good. ---------- components: Library (Lib) messages: 65168 nosy: birkenfeld, djc severity: normal status: open title: urllib2.HTTPError broken due to urllib.addinfourl changes versions: Python 2.6 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2585> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com