diff options
author | Greg Ward <gward@python.net> | 2000-03-26 21:48:43 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-03-26 21:48:43 (GMT) |
commit | 89489fa15d1feb77c4fd90f4c02d708c98c96e6d (patch) | |
tree | 75bc1c95b479ae87af74c98d69815b04ccf54e5a /Lib/distutils/core.py | |
parent | a3c8bf382e5271bc5af9e2eacae22c5bdefdec38 (diff) | |
download | cpython-89489fa15d1feb77c4fd90f4c02d708c98c96e6d.zip cpython-89489fa15d1feb77c4fd90f4c02d708c98c96e6d.tar.gz cpython-89489fa15d1feb77c4fd90f4c02d708c98c96e6d.tar.bz2 |
Beefed up error-handling in 'setup()' a smidge:
handle OSError and DistutilsExecError now.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index df36467..5090f25 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -98,13 +98,15 @@ def setup (**attrs): dist.run_commands () except KeyboardInterrupt: raise SystemExit, "interrupted" - except IOError, exc: + except (OSError, IOError), exc: # arg, try to work with Python pre-1.5.2 if hasattr (exc, 'filename') and hasattr (exc, 'strerror'): raise SystemExit, \ "error: %s: %s" % (exc.filename, exc.strerror) else: raise SystemExit, str (exc) + except DistutilsExecError, msg: + raise SystemExit, "error: " + str (msg) # setup () |