summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2014-11-21 17:54:30 -0800
committerJoshua Harlow <harlowja@yahoo-inc.com>2014-11-21 17:54:30 -0800
commit61882a004937d5e6d922a6cdc4d65aa5a6315ea8 (patch)
tree49014d11dcc69ebeec9d54acc39a89a0abd72363 /cloudinit
parent94565bc8607f35557225589d9dde6d2954d49731 (diff)
parent5d168a9d11e905dd19e24d0596b7d1145e6b8aa1 (diff)
downloadvyos-cloud-init-61882a004937d5e6d922a6cdc4d65aa5a6315ea8.tar.gz
vyos-cloud-init-61882a004937d5e6d922a6cdc4d65aa5a6315ea8.zip
Fix parse_ssh_config failing in ssh_util.py
This fix handles '=' as a delimiter in SSH config and adds appropriate test methods to ensure this functionality continues to work correctly.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/ssh_util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/ssh_util.py b/cloudinit/ssh_util.py
index 70a577bc..14d0cb0f 100644
--- a/cloudinit/ssh_util.py
+++ b/cloudinit/ssh_util.py
@@ -293,7 +293,10 @@ def parse_ssh_config(fname):
if not line or line.startswith("#"):
lines.append(SshdConfigLine(line))
continue
- (key, val) = line.split(None, 1)
+ try:
+ key, val = line.split(None, 1)
+ except ValueError:
+ key, val = line.split('=', 1)
lines.append(SshdConfigLine(line, key, val))
return lines