diff options
author | Greg Ward <gward@python.net> | 2000-04-15 22:15:07 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-04-15 22:15:07 (GMT) |
commit | 02a1a2b077e969e5fef8504cece5852bf641552d (patch) | |
tree | 4adea05076d4dab820180e6c9290ae9b1d7b28a4 /Lib/distutils/util.py | |
parent | 4a3dd2dcc2fae12b6736822731848c557b80d0e3 (diff) | |
download | cpython-02a1a2b077e969e5fef8504cece5852bf641552d.zip cpython-02a1a2b077e969e5fef8504cece5852bf641552d.tar.gz cpython-02a1a2b077e969e5fef8504cece5852bf641552d.tar.bz2 |
Cleaned up/simplified error-handling:
- DistutilsOptionError is now documented as it's actually used, ie.
to indicate bogus option values (usually user options, eg. from
the command-line)
- added DistutilsSetupError to indicate errors that definitely arise
in the setup script
- got rid of DistutilsValueError, and changed all usage of it to
either DistutilsSetupError or ValueError as appropriate
- simplified a bunch of option get/set methods in Command and
Distribution classes -- just pass on AttributeError most of
the time, rather than turning it into something else
Diffstat (limited to 'Lib/distutils/util.py')
-rw-r--r-- | Lib/distutils/util.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index ddcf0d2..be3a1d6 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -40,16 +40,16 @@ def native_path (pathname): using the current directory separator. Needed because filenames in the setup script are always supplied in Unix style, and have to be converted to the local convention before we can actually use them in - the filesystem. Raises DistutilsValueError if 'pathname' is + the filesystem. Raises ValueError if 'pathname' is absolute (starts with '/') or contains local directory separators (unless the local separator is '/', of course).""" if pathname[0] == '/': - raise DistutilsValueError, "path '%s' cannot be absolute" % pathname + raise ValueError, "path '%s' cannot be absolute" % pathname if pathname[-1] == '/': - raise DistutilsValueError, "path '%s' cannot end with '/'" % pathname + raise ValueError, "path '%s' cannot end with '/'" % pathname if os.sep != '/' and os.sep in pathname: - raise DistutilsValueError, \ + raise ValueError, \ "path '%s' cannot contain '%c' character" % \ (pathname, os.sep) |