[Python-checkins] python/dist/src/Lib urllib2.py,1.53,1.54
jhylton at users.sourceforge.net
jhylton at users.sourceforge.net
Mon Oct 6 01:15:16 EDT 2003
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv29488/Lib
Modified Files:
urllib2.py
Log Message:
SF patch [ 816787 ] urllib2.URLError don't calll IOError.__init__
Not sure if this fix is great, but it's probably a small improvement.
Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** urllib2.py 12 Jul 2003 07:33:32 -0000 1.53
--- urllib2.py 6 Oct 2003 05:15:13 -0000 1.54
***************
*** 146,151 ****
class URLError(IOError):
# URLError is a sub-type of IOError, but it doesn't share any of
! # the implementation. need to override __init__ and __str__
def __init__(self, reason):
self.reason = reason
--- 146,155 ----
class URLError(IOError):
# URLError is a sub-type of IOError, but it doesn't share any of
! # the implementation. need to override __init__ and __str__.
! # It sets self.args for compatibility with other EnvironmentError
! # subclasses, but args doesn't have the typical format with errno in
! # slot 0 and strerror in slot 1. This may be better than nothing.
def __init__(self, reason):
+ self.args = reason,
self.reason = reason
More information about the Python-checkins
mailing list