| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
using "%d" % errno to print out IOError exceptions -- but urllib.py
raises exceptions where the errno slot in the exception tuple is a
string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
involve a filesystem path. To that end:
- Changed IOError to EnvironmentError and added a hack which checks
for arg of len 3. When constructed with a 3-tuple, the third item
is the filename and this is squirreled away in the `filename'
attribute. However, for in-place unpacking backwards
compatibility, self.args still only gets the first two items. Added
a __str__() which prints the filename if it is given.
- IOError now inherits from EnvironmentError
- New class OSError which also inherits from EnvironmentError and is
used by the posix module.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows stuff like this out of the box:
try:
...
except socket.error, (code, msg):
...
|
| |
|
|
|
|
|
|
|
| |
(1) Introduce Exception as the conceptual root class for all exceptions.
(2) Do less work in __init__(), and more in __str__ (store args
unchanged).
|
| |
|
|
|
|
|
|
|
|
|
| |
errors are handled (these gave ``TypeError: not enough arguments'').
Also changed its __str__() to correct a typo (missing self.) and
return str(self.msg) to ensure the result is always string.
Also changed the default __str__ to simply return str(self.args).
|
|
started with the -X option. This file contains the definitions for
the built-in exception classes.
|