diff options
author | Barry Warsaw <barry@python.org> | 1998-07-23 16:03:46 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1998-07-23 16:03:46 (GMT) |
commit | 2dfe4de614b9006693d5053fbba462449609ba8e (patch) | |
tree | 0f502e2d6e160169a63034272bfc205f027318ca /Python/errors.c | |
parent | d086a1a8649ca1bb0720d701112c698ab5463db2 (diff) | |
download | cpython-2dfe4de614b9006693d5053fbba462449609ba8e.zip cpython-2dfe4de614b9006693d5053fbba462449609ba8e.tar.gz cpython-2dfe4de614b9006693d5053fbba462449609ba8e.tar.bz2 |
Added support for including the filename in IOErrors and OSErrors that
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.
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions