summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmre Yılmaz <mail@emreyilmaz.me>2013-05-21 00:40:28 +0300
committerEmre Yılmaz <mail@emreyilmaz.me>2013-05-21 00:40:28 +0300
commit3399d519e04c73ea2c16df4037da9de20b5c83f6 (patch)
treeea375a769601966b5d0b569faa77ba8d2cc2d2d3
parentd77a4d6421a726584da228c30587bfa265fee8ea (diff)
updated config to be compatible with multiple localforward and remoteforward options.
-rw-r--r--paramiko/config.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/paramiko/config.py b/paramiko/config.py
index 31caf29e..b0be1a8e 100644
--- a/paramiko/config.py
+++ b/paramiko/config.py
@@ -126,14 +126,15 @@ class SSHConfig (object):
self._config.append(host)
value = value.split()
host = {key: value, 'config': {}}
- #identityfile is a special case, since it is allowed to be
+ #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 == 'identityfile':
+
+ elif key in ['identityfile', 'localforward', 'remoteforward']:
if key in host['config']:
- host['config']['identityfile'].append(value)
+ host['config'][key].append(value)
else:
- host['config']['identityfile'] = [value]
+ host['config'][key] = [value]
elif key not in host['config']:
host['config'].update({key: value})
self._config.append(host)