diff options
author | Amitay Isaacs <amitay@gmail.com> | 2011-09-09 13:24:10 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-09-09 15:24:04 +1000 |
commit | e9f155f52dbde0d715c4cb48093c09ba169262f7 (patch) | |
tree | 8c4a4995a21f1f7eeefefa406989a7c9744adc3b | |
parent | b2a7fe166c95ef5d5f5b6af76303cc8d456ac816 (diff) | |
download | samba-e9f155f52dbde0d715c4cb48093c09ba169262f7.tar.gz samba-e9f155f52dbde0d715c4cb48093c09ba169262f7.tar.bz2 samba-e9f155f52dbde0d715c4cb48093c09ba169262f7.zip |
samba-tool: max() with key option is available in python >= 2.6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/scripting/python/samba/netcmd/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index d4f9b4b710..288993f561 100644 --- a/source4/scripting/python/samba/netcmd/__init__.py +++ b/source4/scripting/python/samba/netcmd/__init__.py @@ -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" |