0
0
mirror of https://github.com/python/cpython.git synced 2024-11-28 08:20:55 +01:00

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

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