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'])]
|
matches = [x for x in config if fnmatch.fnmatch(hostname, x['host'])]
|
||||||
# sort in order of shortest match (usually '*') to longest
|
# 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 = {}
|
ret = {}
|
||||||
for m in matches:
|
for m in matches:
|
||||||
ret.update(m)
|
ret.update(m)
|
||||||
|
|
Loading…
Reference in New Issue