[issue2585] urllib2.HTTPError broken due to urllib.addinfourl changes

2008-04-09 Thread Guilherme Polo

Guilherme Polo [EMAIL PROTECTED] added the comment:

It seems the fix is just passing code to addinfourl __init__, not sure
if someone forgot this or this is just totally wrong.

Patch added.

--
keywords: +patch
nosy: +gpolo
Added file: http://bugs.python.org/file9992/urllib2_2585.diff

__
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



[issue2585] urllib2.HTTPError broken due to urllib.addinfourl changes

2008-04-09 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Thanks Guilherme, that is indeed a detail that I forgot. Fixed in r62246.

--
resolution:  - fixed
status: open - closed

__
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



[issue2585] urllib2.HTTPError broken due to urllib.addinfourl changes

2008-04-08 Thread djc

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



[issue2585] urllib2.HTTPError broken due to urllib.addinfourl changes

2008-04-08 Thread djc

Changes by djc [EMAIL PROTECTED]:


--
nosy: +georg.brandl -birkenfeld

__
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