patch from jan hudec to fix a python 2.4-ism
This commit is contained in:
parent
cb3008b402
commit
be7d99886c
|
@ -294,7 +294,7 @@ def lookup_ssh_host_config(hostname, config):
|
|||
"""
|
||||
matches = [x for x in config if fnmatch.fnmatch(hostname, x['host'])]
|
||||
# sort in order of shortest match (usually '*') to longest
|
||||
matches.sort(key=lambda x: len(x['host']))
|
||||
matches.sort(lambda x,y: cmp(len(x['host']), len(x['host'])))
|
||||
ret = {}
|
||||
for m in matches:
|
||||
ret.update(m)
|
||||
|
|
Loading…
Reference in New Issue