summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOlle Lundberg <geek@nerd.sh>2012-11-20 00:45:32 +0100
committerOlle Lundberg <geek@nerd.sh>2012-11-20 00:45:32 +0100
commit78654e82ecfceba30c61974b18fd4809b1ea9899 (patch)
treef7716f4d32ca70de9d19f5c59c2e59bfc2c56f73
parent221131fa21e624a30d0d7cd5ed29e2749ddfd246 (diff)
DRY up the code for populating the return list
-rw-r--r--paramiko/config.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/paramiko/config.py b/paramiko/config.py
index bd1c2f65..135e0090 100644
--- a/paramiko/config.py
+++ b/paramiko/config.py
@@ -121,13 +121,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