Files
python-uncompyle6/test/simple_source/bug32/03_if_try_raise.py
rocky 0e54c37fab Trystmt grammar from 3.3 needed in 3.2
Add test to cover this
2017-11-23 14:29:31 -05:00

22 lines
551 B
Python

# From 3.2 distutils/core
# Ensure we handle funky trystmt
def setup (ok, dist, **attrs):
if ok:
try:
dist.run_commands()
except KeyboardInterrupt:
raise SystemExit("interrupted")
except IOError as exc:
error = exc
if dist:
raise
else:
raise SystemExit(error)
except (RuntimeError) as msg:
if dist:
raise
else:
raise SystemExit("error: " + str(msg))
return dist