diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/netcmd/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index a4a3397d80..3b7b982459 100644 --- a/source4/scripting/python/samba/netcmd/__init__.py +++ b/source4/scripting/python/samba/netcmd/__init__.py @@ -162,8 +162,9 @@ class SuperCommand(Command): print "Available subcommands:" subcmds = self.subcommands.keys() subcmds.sort() + max_length = len(max(subcmds, key=len)) for cmd in subcmds: - print " %-20s - %s" % (cmd, self.subcommands[cmd].description) + print " %*s - %s" % (-max_length, cmd, self.subcommands[cmd].description) if subcommand in [None]: raise CommandError("You must specify a subcommand") if subcommand in ['help', '-h', '--help']: |