diff options
-rw-r--r-- | paramiko/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/util.py b/paramiko/util.py index 77eee3f6..809b850d 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) |