diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-08-25 23:34:14 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-08-25 23:34:14 -0700 |
commit | 401b2fcb6514c723877cece9c13aa27281c7d994 (patch) | |
tree | 3bc7cefa2f0ac151626e82b3429ce5c2bd9166b8 | |
parent | 77a35401cc62a4abc9eced101aa2ab8439548c54 (diff) | |
parent | 3908baad6e1d6d4fc62da24111cd466ce5cb9a88 (diff) |
Merge branch '1.13' into 1.14
-rw-r--r-- | paramiko/config.py | 10 | ||||
-rw-r--r-- | sites/www/changelog.rst | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/paramiko/config.py b/paramiko/config.py index f650ee24..96ec9ef7 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -83,7 +83,7 @@ class SSHConfig (object): #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) @@ -200,10 +200,12 @@ class SSHConfig (object): 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 diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 30587a18..33b6d220 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,9 @@ Changelog ========= +* :bug:`376` Be less aggressive about expanding variables in ``ssh_config`` + files, which results in a speedup of SSH config parsing. Credit to Olle + Lundberg. * :support:`324 backported` A bevvy of documentation typo fixes, courtesy of Roy Wellington. * :bug:`312` `paramiko.transport.Transport` had a bug in its ``__repr__`` which |