john a meinel caught a typo in the previous sort() patch
This commit is contained in:
parent
6a145dea09
commit
1731d51b51
|
@ -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(lambda x,y: cmp(len(x['host']), len(x['host'])))
|
matches.sort(lambda x,y: cmp(len(x['host']), len(y['host'])))
|
||||||
ret = {}
|
ret = {}
|
||||||
for m in matches:
|
for m in matches:
|
||||||
ret.update(m)
|
ret.update(m)
|
||||||
|
|
Loading…
Reference in New Issue