samba-tool: epilog option to OptionParser available in python >= 2.6
authorAmitay Isaacs <amitay@gmail.com>
Fri, 9 Sep 2011 03:27:13 +0000 (13:27 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 9 Sep 2011 05:24:05 +0000 (15:24 +1000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/scripting/python/samba/netcmd/__init__.py
source4/scripting/python/samba/netcmd/fsmo.py
source4/scripting/python/samba/netcmd/time.py
source4/scripting/python/samba/netcmd/user.py
source4/scripting/python/samba/netcmd/vampire.py

index 772ced94637a37a49110e93c34cc004e61ce2dc2..58d566071f564ff6dc50c085627dd91ffddae9b4 100644 (file)
@@ -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']:
index 58b920d0a370d39fcb7bce9838000204a7c3de39..3e296dd83d5cfac9235e164466917e264748c0a3 100644 (file)
@@ -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()
index 4052f8a5b79bb4acda0c26dfc1daf84e1d2bcff1..9b520944847c194d777f98f5493d8e84ccbd9fea 100644 (file)
@@ -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?"]
index 278a4ff676cfa602e6be0f4edf393de808c41415..5af80ffd74f6008e962c0f8ab3a0728f90199415 100644 (file)
@@ -288,7 +288,7 @@ class cmd_user_setpassword(Command):
 
 
 class cmd_user(SuperCommand):
-    """User management *"""
+    """User management"""
 
     subcommands = {}
     subcommands["add"] = cmd_user_add()
index 8c0c25cd983b1118e43537e267a96b492d1fde47..dc522ff5d18a026238dbfccc96651c733d715916 100644 (file)
@@ -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 = [