Skip to content

Commit

Permalink
Merge 29e0963 into 991d56b
Browse files Browse the repository at this point in the history
  • Loading branch information
lndbrg committed Aug 15, 2014
2 parents 991d56b + 29e0963 commit 930d6f5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions paramiko/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def parse(self, file_obj):
#identityfile, localforward, remoteforward keys are special cases, since they are allowed to be
# specified multiple times and they should be tried in order
# of specification.

elif key in ['identityfile', 'localforward', 'remoteforward']:
if key in host['config']:
host['config'][key].append(value)
Expand Down Expand Up @@ -200,10 +200,12 @@ def _expand_variables(self, config, hostname):
for find, replace in replacements[k]:
if isinstance(config[k], list):
for item in range(len(config[k])):
config[k][item] = config[k][item].\
replace(find, str(replace))
if find in config[k][item]:
config[k][item] = config[k][item].\
replace(find, str(replace))
else:
config[k] = config[k].replace(find, str(replace))
if find in config[k]:
config[k] = config[k].replace(find, str(replace))
return config


Expand Down

0 comments on commit 930d6f5

Please sign in to comment.