Commit ed5b355e authored by Reinout van Rees's avatar Reinout van Rees

Fixes #73: propagate exit code from restart.

A restarted project's exit code is now properly propagated. This makes
buildout more reliable in automatically-run situations.
parent bc19672c
......@@ -1807,7 +1807,11 @@ def main(args=None):
command, args)
getattr(buildout, command)(args)
except SystemExit:
pass
logging.shutdown()
# Make sure we properly propagate an exit code from a restarted
# buildout process.
exit_code = sys.exc_info()[1]
sys.exit(exit_code)
except Exception:
v = sys.exc_info()[1]
_doing()
......@@ -1828,10 +1832,10 @@ def main(args=None):
traceback.print_exception(*exc_info)
sys.exit(1)
finally:
logging.shutdown()
if sys.version_info[:2] < (2, 4):
def reversed(iterable):
result = list(iterable);
......
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