john a meinel caught a typo in the previous sort() patch
This commit is contained in:
Robey Pointer 2006-01-18 23:21:56 -08:00
parent 6a145dea09
commit 1731d51b51
1 changed files with 1 additions and 1 deletions

View File

@ -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(lambda x,y: cmp(len(x['host']), len(x['host'])))
matches.sort(lambda x,y: cmp(len(x['host']), len(y['host'])))
ret = {}
for m in matches:
ret.update(m)