summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-09-11 08:21:27 +0200
committerStefan Metzmacher <metze@samba.org>2012-09-11 08:23:55 +0200
commit475755ef9ff5f39ba499de8f30c23efcce10ba0c (patch)
tree87930a253aaf15855abeb02c52543c0104c4a14c
parent5de7a3d73908f50dbaf141d2f964849904b2fa1a (diff)
downloadsamba-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-xsource4/scripting/bin/samba-tool2
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