From 475755ef9ff5f39ba499de8f30c23efcce10ba0c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 11 Sep 2012 08:21:27 +0200 Subject: s4:samba-tool: allow sys.exit(ret) to control the exit code Some subcommands may use sys.exit(0), which shouldn't be reported as an error to the caller. metze --- source4/scripting/bin/samba-tool | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool index c4ea814166..8ec6514bbf 100755 --- a/source4/scripting/bin/samba-tool +++ b/source4/scripting/bin/samba-tool @@ -36,7 +36,7 @@ if len(sys.argv) > 1: try: retval = cmd._run("samba-tool", subcommand, *args) except SystemExit, e: - retval = -1 + retval = e.code except Exception, e: cmd.show_command_error(e) retval = 1 -- cgit