diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-09-11 08:21:27 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-09-11 08:23:55 +0200 |
commit | 475755ef9ff5f39ba499de8f30c23efcce10ba0c (patch) | |
tree | 87930a253aaf15855abeb02c52543c0104c4a14c | |
parent | 5de7a3d73908f50dbaf141d2f964849904b2fa1a (diff) | |
download | samba-475755ef9ff5f39ba499de8f30c23efcce10ba0c.tar.gz samba-475755ef9ff5f39ba499de8f30c23efcce10ba0c.tar.bz2 samba-475755ef9ff5f39ba499de8f30c23efcce10ba0c.zip |
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
-rwxr-xr-x | source4/scripting/bin/samba-tool | 2 |
1 files changed, 1 insertions, 1 deletions
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 |