mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
samba-tool: max() with key option is available in python >= 2.6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b2a7fe166c
commit
e9f155f52d
@ -162,7 +162,7 @@ class SuperCommand(Command):
|
||||
print "Available subcommands:"
|
||||
subcmds = self.subcommands.keys()
|
||||
subcmds.sort()
|
||||
max_length = len(max(subcmds, key=len))
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user