Mercurial > cpython-lru_cache-weakref
diff Lib/exceptions.py @ 8774:edbf631fb7e9 legacy-trunk
fix __str__ method of EnvironmentError (base class of IOError): was
using "%d" % errno to print out IOError exceptions -- but urllib.py
raises exceptions where the errno slot in the exception tuple is a
string.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Tue, 28 Jul 1998 17:30:06 +0000 |
| parents | 8571c1246f09 |
| children | 0a6892b1a4ac |
line wrap: on
line diff
--- a/Lib/exceptions.py Mon Jul 27 22:30:15 1998 +0000 +++ b/Lib/exceptions.py Tue Jul 28 17:30:06 1998 +0000 @@ -105,10 +105,10 @@ def __str__(self): if self.filename: - return '[Errno %d] %s: %s' % (self.errno, self.strerror, + return '[Errno %s] %s: %s' % (self.errno, self.strerror, self.filename) elif self.errno and self.strerror: - return '[Errno %d] %s' % (self.errno, self.strerror) + return '[Errno %s] %s' % (self.errno, self.strerror) else: return StandardError.__str__(self)
