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:
parent
a3c8bf382e
commit
89489fa15d
@ -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 ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user