From: Douglas Bagnall Date: Tue, 1 Jun 2021 00:48:24 +0000 (+0000) Subject: samba-tool: stick to the point with --version X-Git-Tag: tevent-0.11.0~440 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe91e643cb5215efa7269edeb91d2f9577c33258;p=thirdparty%2Fsamba.git samba-tool: stick to the point with --version We were doing this: $ bin/samba-tool --version samba-tool: no such subcommand: --version 4.15.0pre1-DEVELOPERBUILD $ which is silly. Now we'll just see the version. Signed-off-by: Douglas Bagnall Reviewed-by: Jeremy Allison --- diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 620e3751e7f..62fe1380d52 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -234,7 +234,7 @@ class SuperCommand(Command): if subcommand in self.subcommands: return self.subcommands[subcommand]._run( "%s %s" % (myname, subcommand), *args) - elif subcommand not in [ '--help', 'help', None ]: + elif subcommand not in [ '--help', 'help', None, '-h', '-V', '--version' ]: print("%s: no such subcommand: %s\n" % (myname, subcommand)) args = []