Commit 89489fa1 authored by Greg Ward's avatar Greg Ward

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

handle OSError and DistutilsExecError now.
parent a3c8bf38
......@@ -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 ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment