mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +03:00
python: netcmd: SUPPRESS_HELP constant has no effect here
Where it is used, on a few options, the constant should be used directly instead. This means that in the following commit, the Option subclass of SambaOption can be removed, as it will become redundant. Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
a930456f0c
commit
32032937ed
@@ -34,7 +34,7 @@ from .encoders import JSONEncoder
|
||||
|
||||
|
||||
class Option(SambaOption):
|
||||
SUPPRESS_HELP = optparse.SUPPRESS_HELP
|
||||
pass
|
||||
|
||||
|
||||
class PlainHelpFormatter(optparse.IndentedHelpFormatter):
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import optparse
|
||||
import sys
|
||||
|
||||
import ldb
|
||||
@@ -84,7 +85,7 @@ class cmd_dbcheck(Command):
|
||||
type=str, metavar="URL", dest="H"),
|
||||
Option("--selftest-check-expired-tombstones",
|
||||
dest="selftest_check_expired_tombstones", default=False, action="store_true",
|
||||
help=Option.SUPPRESS_HELP), # This is only used by tests
|
||||
help=optparse.SUPPRESS_HELP), # This is only used by tests
|
||||
]
|
||||
|
||||
def run(self, DN=None, H=None, verbose=False, fix=False, yes=False,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
import optparse
|
||||
import os
|
||||
|
||||
import samba.getopt as options
|
||||
@@ -75,7 +76,7 @@ class cmd_ntacl_set(Command):
|
||||
|
||||
takes_options = [
|
||||
# --quiet is not used at all...
|
||||
Option("-q", "--quiet", help=Option.SUPPRESS_HELP, action="store_true"),
|
||||
Option("-q", "--quiet", help=optparse.SUPPRESS_HELP, action="store_true"),
|
||||
Option("-v", "--verbose", help="Be verbose", action="store_true"),
|
||||
Option("--xattr-backend", type="choice", help="xattr backend type (native fs or tdb)",
|
||||
choices=["native", "tdb"]),
|
||||
|
||||
Reference in New Issue
Block a user