From ea3c3f53b662eafa5dfa8e25d9543a568b81b353 Mon Sep 17 00:00:00 2001 From: Olle Lundberg Date: Tue, 20 Nov 2012 00:45:32 +0100 Subject: [PATCH] DRY up the code for populating the return list --- paramiko/config.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/paramiko/config.py b/paramiko/config.py index 143223d..5e1cd88 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -156,13 +156,10 @@ class SSHConfig (object): ret = {} for match in matches: for key, value in match['config'].iteritems(): - if key == 'identityfile': - if key in ret: - ret['identityfile'].extend(value) - else: - ret['identityfile'] = value - elif key not in ret: + if key not in ret: ret[key] = value + elif key == 'identityfile': + ret[key].extend(value) ret = self._expand_variables(ret, hostname) return ret