summaryrefslogtreecommitdiff
path: root/cloudinit/ssh_util.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 19:24:30 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 19:24:30 -0700
commit8034ab85b03f31dce06b9c66ed03132c95b7875c (patch)
tree1866a4c3f27b637997d27e3027abbf43ca1c2199 /cloudinit/ssh_util.py
parentb71b42c9f99b97d6340a8274a249ed2c62ec7bfe (diff)
downloadvyos-cloud-init-8034ab85b03f31dce06b9c66ed03132c95b7875c.tar.gz
vyos-cloud-init-8034ab85b03f31dce06b9c66ed03132c95b7875c.zip
Send in src line instead of stripped line.
Diffstat (limited to 'cloudinit/ssh_util.py')
-rw-r--r--cloudinit/ssh_util.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/cloudinit/ssh_util.py b/cloudinit/ssh_util.py
index 663afd92..d58707d0 100644
--- a/cloudinit/ssh_util.py
+++ b/cloudinit/ssh_util.py
@@ -128,7 +128,7 @@ class AuthKeyLineParser(object):
toks = rest.split(None, 2)
return (options_lst, toks)
- def _form_components(self, line, toks, options=None):
+ def _form_components(self, src_line, toks, options=None):
components = {}
if len(toks) == 1:
components['base64'] = toks[0]
@@ -141,26 +141,26 @@ class AuthKeyLineParser(object):
components['comment'] = toks[2]
components['options'] = options
if not components:
- return AuthKeyLine(line)
+ return AuthKeyLine(src_line)
else:
- return AuthKeyLine(line, **components)
+ return AuthKeyLine(src_line, **components)
- def parse(self, in_line, def_opt=None):
- line = in_line.rstrip("\r\n")
+ def parse(self, src_line, def_opt=None):
+ line = src_line.rstrip("\r\n")
if line.startswith("#") or line.strip() == '':
- return AuthKeyLine(source=line)
+ return AuthKeyLine(src_line)
else:
ent = line.strip()
toks = ent.split(None, 3)
if len(toks) < 4:
- return self._form_components(line, toks, def_opt)
+ return self._form_components(src_line, toks, def_opt)
else:
(options, toks) = self._extract_options(ent)
if options:
options = ",".join(options)
else:
options = def_opt
- return self._form_components(line, toks, options)
+ return self._form_components(src_line, toks, options)
def parse_authorized_keys(fname):