Skip to content

Commit

Permalink
DRY up the code for populating the return list
Browse files Browse the repository at this point in the history
  • Loading branch information
lndbrg committed Feb 28, 2013
1 parent c79e6a3 commit ea3c3f5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions paramiko/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,10 @@ def lookup(self, hostname):
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

Expand Down

0 comments on commit ea3c3f5

Please sign in to comment.