mirror of
https://github.com/samba-team/samba.git
synced 2025-03-04 16:58:42 +03:00
samba-tool: epilog option to OptionParser available in python >= 2.6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
4d0ead86e1
commit
46754e9665
@ -49,8 +49,6 @@ class Command(object):
|
||||
"credopts": options.CredentialsOptions,
|
||||
"versionopts": options.VersionOptions,
|
||||
}
|
||||
# This epilog will print at the end when the user invokes the command w/ -h or --help
|
||||
epilog = ""
|
||||
outf = sys.stdout
|
||||
|
||||
def usage(self, *args):
|
||||
@ -92,7 +90,7 @@ class Command(object):
|
||||
sys.exit(1)
|
||||
|
||||
def _create_parser(self):
|
||||
parser = optparse.OptionParser(usage=self.synopsis, epilog=self.epilog,
|
||||
parser = optparse.OptionParser(usage=self.synopsis,
|
||||
description=self.long_description)
|
||||
parser.add_options(self.takes_options)
|
||||
optiongroups = {}
|
||||
@ -165,7 +163,6 @@ class SuperCommand(Command):
|
||||
max_length = max(map(lambda c: len(c), subcmds))
|
||||
for cmd in subcmds:
|
||||
print " %*s - %s" % (-max_length, cmd, self.subcommands[cmd].description)
|
||||
print " * server connection needed"
|
||||
if subcommand in [None]:
|
||||
raise CommandError("You must specify a subcommand")
|
||||
if subcommand in ['help', '-h', '--help']:
|
||||
|
@ -254,7 +254,7 @@ all=all of the above"""),
|
||||
|
||||
|
||||
class cmd_fsmo(SuperCommand):
|
||||
"""Flexible Single Master Operations (FSMO) roles management *"""
|
||||
"""Flexible Single Master Operations (FSMO) roles management"""
|
||||
|
||||
subcommands = {}
|
||||
subcommands["seize"] = cmd_fsmo_seize()
|
||||
|
@ -28,7 +28,7 @@ from samba.netcmd import (
|
||||
)
|
||||
|
||||
class cmd_time(Command):
|
||||
"""Retrieve the time on a remote server *"""
|
||||
"""Retrieve the time on a remote server"""
|
||||
synopsis = "%prog time [server-name] [options]"
|
||||
|
||||
takes_args = ["server_name?"]
|
||||
|
@ -288,7 +288,7 @@ class cmd_user_setpassword(Command):
|
||||
|
||||
|
||||
class cmd_user(SuperCommand):
|
||||
"""User management *"""
|
||||
"""User management"""
|
||||
|
||||
subcommands = {}
|
||||
subcommands["add"] = cmd_user_add()
|
||||
|
@ -31,7 +31,7 @@ from samba.netcmd import (
|
||||
)
|
||||
|
||||
class cmd_vampire(Command):
|
||||
"""Join and synchronise a remote AD domain to the local server [server connection needed]"""
|
||||
"""Join and synchronise a remote AD domain to the local server"""
|
||||
synopsis = "%prog vampire [options] <domain>"
|
||||
|
||||
takes_options = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user