summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index e5d20ef301..f8371e7a7d 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -82,6 +82,7 @@ class Command(object):
if force_traceback or samba.get_debug_level() >= 3:
traceback.print_tb(etraceback)
+ sys.exit(1)
outf = sys.stdout
@@ -171,7 +172,7 @@ class SuperCommand(Command):
'''display a command error'''
print >>sys.stderr, "ERROR: %s" % (msg)
- return -1
+ sys.exit(1)
def usage(self, myname, subcommand=None, *args):
if subcommand is None or not subcommand in self.subcommands: