diff options
-rw-r--r-- | zephyr/zmake/zmake/__main__.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/zephyr/zmake/zmake/__main__.py b/zephyr/zmake/zmake/__main__.py index 3eb599c921..8dfc57eede 100644 --- a/zephyr/zmake/zmake/__main__.py +++ b/zephyr/zmake/zmake/__main__.py @@ -134,11 +134,13 @@ def main(argv=None): if not opts.debug: sys.tracebacklimit = 0 - zmake = call_with_namespace(zm.Zmake, opts) - subcommand_method = getattr(zmake, opts.subcommand.replace('-', '_')) - result = call_with_namespace(subcommand_method, opts) - multiproc.wait_for_log_end() - return result + try: + zmake = call_with_namespace(zm.Zmake, opts) + subcommand_method = getattr(zmake, opts.subcommand.replace('-', '_')) + result = call_with_namespace(subcommand_method, opts) + return result + finally: + multiproc.wait_for_log_end() if __name__ == '__main__': |