From: Greg Ward Date: Sun, 26 Mar 2000 21:48:43 +0000 (+0000) Subject: Beefed up error-handling in 'setup()' a smidge: X-Git-Tag: v1.6a1~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=89489fa15d1feb77c4fd90f4c02d708c98c96e6d;p=python Beefed up error-handling in 'setup()' a smidge: handle OSError and DistutilsExecError now. --- diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index df3646765f..5090f25bc3 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 ()