Beefed up error-handling in 'setup()' a smidge:

handle OSError and DistutilsExecError now.
This commit is contained in:
Greg Ward 2000-03-26 21:48:43 +00:00
parent a3c8bf382e
commit 89489fa15d
1 changed files with 3 additions and 1 deletions

View File

@ -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 ()