diff options
author | Olle Lundberg <geek@nerd.sh> | 2012-11-20 00:45:32 +0100 |
---|---|---|
committer | Olle Lundberg <geek@nerd.sh> | 2013-02-28 12:14:59 +0100 |
commit | ea3c3f53b662eafa5dfa8e25d9543a568b81b353 (patch) | |
tree | 9e1f774c593f34158689e815d8d97cd63459460d | |
parent | c79e6a3f92938af07915c23ea1d7cbb75dac6d89 (diff) |
DRY up the code for populating the return list
-rw-r--r-- | paramiko/config.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/paramiko/config.py b/paramiko/config.py index 143223d9..5e1cd88a 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 |