1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-14 12:59:07 +03:00

samba-tool: make sure we exit with an error on a bad command

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Jul 21 04:58:01 CEST 2011 on sn-devel-104
This commit is contained in:
Andrew Tridgell
2011-07-21 10:29:21 +10:00
parent 6e82e20831
commit 7f9d45bf10

View File

@ -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: