You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
22 lines
554 B
Python
22 lines
554 B
Python
# From 3.2 distutils/core
|
|
# Ensure we handle funky try_except
|
|
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
|