diff options
| author | Amitay Isaacs <amitay@gmail.com> | 2011-09-09 13:27:13 +1000 | 
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2011-09-09 15:24:05 +1000 | 
| commit | 46754e9665ceefe26cf28fbc70629e9660d847da (patch) | |
| tree | b873c3232dfb511f222b363b35ccd2617689065f /source4/scripting/python | |
| parent | 4d0ead86e1211ef81fb07621afd6028768e2fb07 (diff) | |
| download | samba-46754e9665ceefe26cf28fbc70629e9660d847da.tar.gz samba-46754e9665ceefe26cf28fbc70629e9660d847da.tar.bz2 samba-46754e9665ceefe26cf28fbc70629e9660d847da.zip | |
samba-tool: epilog option to OptionParser available in python >= 2.6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python')
| -rw-r--r-- | source4/scripting/python/samba/netcmd/__init__.py | 5 | ||||
| -rw-r--r-- | source4/scripting/python/samba/netcmd/fsmo.py | 2 | ||||
| -rw-r--r-- | source4/scripting/python/samba/netcmd/time.py | 2 | ||||
| -rw-r--r-- | source4/scripting/python/samba/netcmd/user.py | 2 | ||||
| -rw-r--r-- | source4/scripting/python/samba/netcmd/vampire.py | 2 | 
5 files changed, 5 insertions, 8 deletions
| diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index 772ced9463..58d566071f 100644 --- a/source4/scripting/python/samba/netcmd/__init__.py +++ b/source4/scripting/python/samba/netcmd/__init__.py @@ -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']: diff --git a/source4/scripting/python/samba/netcmd/fsmo.py b/source4/scripting/python/samba/netcmd/fsmo.py index 58b920d0a3..3e296dd83d 100644 --- a/source4/scripting/python/samba/netcmd/fsmo.py +++ b/source4/scripting/python/samba/netcmd/fsmo.py @@ -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() diff --git a/source4/scripting/python/samba/netcmd/time.py b/source4/scripting/python/samba/netcmd/time.py index 4052f8a5b7..9b52094484 100644 --- a/source4/scripting/python/samba/netcmd/time.py +++ b/source4/scripting/python/samba/netcmd/time.py @@ -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?"] diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py index 278a4ff676..5af80ffd74 100644 --- a/source4/scripting/python/samba/netcmd/user.py +++ b/source4/scripting/python/samba/netcmd/user.py @@ -288,7 +288,7 @@ class cmd_user_setpassword(Command):  class cmd_user(SuperCommand): -    """User management *""" +    """User management"""      subcommands = {}      subcommands["add"] = cmd_user_add() diff --git a/source4/scripting/python/samba/netcmd/vampire.py b/source4/scripting/python/samba/netcmd/vampire.py index 8c0c25cd98..dc522ff5d1 100644 --- a/source4/scripting/python/samba/netcmd/vampire.py +++ b/source4/scripting/python/samba/netcmd/vampire.py @@ -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 = [ | 
