patch from jan hudec to fix a python 2.4-ism
This commit is contained in:
Robey Pointer 2006-01-14 22:33:38 -08:00
parent cb3008b402
commit be7d99886c
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(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)