summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-09-09 13:24:10 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-09 15:24:04 +1000
commite9f155f52dbde0d715c4cb48093c09ba169262f7 (patch)
tree8c4a4995a21f1f7eeefefa406989a7c9744adc3b
parentb2a7fe166c95ef5d5f5b6af76303cc8d456ac816 (diff)
downloadsamba-e9f155f52dbde0d715c4cb48093c09ba169262f7.tar.gz
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__.py2
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 d4f9b4b7102..288993f561d 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"