mirror of
https://github.com/samba-team/samba.git
synced 2025-12-18 08:23:51 +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):
|
class Option(SambaOption):
|
||||||
SUPPRESS_HELP = optparse.SUPPRESS_HELP
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PlainHelpFormatter(optparse.IndentedHelpFormatter):
|
class PlainHelpFormatter(optparse.IndentedHelpFormatter):
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import optparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import ldb
|
import ldb
|
||||||
@@ -84,7 +85,7 @@ class cmd_dbcheck(Command):
|
|||||||
type=str, metavar="URL", dest="H"),
|
type=str, metavar="URL", dest="H"),
|
||||||
Option("--selftest-check-expired-tombstones",
|
Option("--selftest-check-expired-tombstones",
|
||||||
dest="selftest_check_expired_tombstones", default=False, action="store_true",
|
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,
|
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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import optparse
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import samba.getopt as options
|
import samba.getopt as options
|
||||||
@@ -75,7 +76,7 @@ class cmd_ntacl_set(Command):
|
|||||||
|
|
||||||
takes_options = [
|
takes_options = [
|
||||||
# --quiet is not used at all...
|
# --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("-v", "--verbose", help="Be verbose", action="store_true"),
|
||||||
Option("--xattr-backend", type="choice", help="xattr backend type (native fs or tdb)",
|
Option("--xattr-backend", type="choice", help="xattr backend type (native fs or tdb)",
|
||||||
choices=["native", "tdb"]),
|
choices=["native", "tdb"]),
|
||||||
|
|||||||
Reference in New Issue
Block a user