From 89489fa15d1feb77c4fd90f4c02d708c98c96e6d Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Sun, 26 Mar 2000 21:48:43 +0000 Subject: [PATCH] Beefed up error-handling in 'setup()' a smidge: handle OSError and DistutilsExecError now. --- Lib/distutils/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index df3646765f4..5090f25bc37 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 ()