diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-07-21 12:32:53 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-28 15:20:52 +1000 |
commit | 48d905f281af80e0d0dd0269a72fecdf05aeb1be (patch) | |
tree | 3e6d411ebba6ff9c09bcba24844c366b272c1bbd /source4 | |
parent | e79040cc720c18cce11731f5140411b40d7dad68 (diff) | |
download | samba-48d905f281af80e0d0dd0269a72fecdf05aeb1be.tar.gz samba-48d905f281af80e0d0dd0269a72fecdf05aeb1be.tar.bz2 samba-48d905f281af80e0d0dd0269a72fecdf05aeb1be.zip |
samba-tool: Catch exceptions at top-level and exit with correct return value
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/bin/samba-tool | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool index f220b82fd9..c24c0e38db 100755 --- a/source4/scripting/bin/samba-tool +++ b/source4/scripting/bin/samba-tool @@ -70,4 +70,8 @@ if __name__ == '__main__': if len(sys.argv) > 2: args = sys.argv[2:] - cmd._run("samba-tool.py", command, *args) + try: + retval = cmd._run("samba-tool", command, *args) + sys.exit(retval) + except Exception as e: + cmd.show_command_error(e) |