From be7d99886c2f6223d8f0899e4864c11f922dfde8 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Sat, 14 Jan 2006 22:33:38 -0800 Subject: [PATCH] [project @ robey@master-shake.local-20060115063338-50ebabff6276f500] patch from jan hudec to fix a python 2.4-ism --- paramiko/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paramiko/util.py b/paramiko/util.py index 77eee3f..809b850 100644 --- a/paramiko/util.py +++ b/paramiko/util.py @@ -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)