Commit fe9e556e authored by S. Zeid's avatar S. Zeid

[cli/engine/command:generate_output] catch SystemExit and use its exit code

parent ecc515b9
......@@ -183,6 +183,8 @@ class Command(object):
except ValueError:
self.return_code = 127
except SystemExit, exc:
self.return_code = exc.code
except Exception, exc:
tb = traceback.format_exc()
yield output.traceback(tb)
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