summaryrefslogtreecommitdiff
path: root/cloudinit/distros/parsers/sys_conf.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-04 01:55:28 -0500
committerScott Moser <smoser@ubuntu.com>2016-03-04 01:55:28 -0500
commit1a9a408a7bf6d7a1a06254ad2939bd549acba69b (patch)
treeec4f76ea5260e269c83addbfafa4376ea2678059 /cloudinit/distros/parsers/sys_conf.py
parentbbf105baafbe788f7babbda188b513180424e256 (diff)
parent8092805079d011093724d87e9485e5bf79479a72 (diff)
downloadvyos-cloud-init-1a9a408a7bf6d7a1a06254ad2939bd549acba69b.tar.gz
vyos-cloud-init-1a9a408a7bf6d7a1a06254ad2939bd549acba69b.zip
merge with trunk
Diffstat (limited to 'cloudinit/distros/parsers/sys_conf.py')
-rw-r--r--cloudinit/distros/parsers/sys_conf.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/distros/parsers/sys_conf.py b/cloudinit/distros/parsers/sys_conf.py
index d795e12f..6157cf32 100644
--- a/cloudinit/distros/parsers/sys_conf.py
+++ b/cloudinit/distros/parsers/sys_conf.py
@@ -77,8 +77,7 @@ class SysConf(configobj.ConfigObj):
quot_func = None
if value[0] in ['"', "'"] and value[-1] in ['"', "'"]:
if len(value) == 1:
- quot_func = (lambda x:
- self._get_single_quote(x) % x)
+ quot_func = (lambda x: self._get_single_quote(x) % x)
else:
# Quote whitespace if it isn't the start + end of a shell command
if value.strip().startswith("$(") and value.strip().endswith(")"):
@@ -91,10 +90,10 @@ class SysConf(configobj.ConfigObj):
# to use single quotes which won't get expanded...
if re.search(r"[\n\"']", value):
quot_func = (lambda x:
- self._get_triple_quote(x) % x)
+ self._get_triple_quote(x) % x)
else:
quot_func = (lambda x:
- self._get_single_quote(x) % x)
+ self._get_single_quote(x) % x)
else:
quot_func = pipes.quote
if not quot_func: