diff options
| author | Scott Moser <smoser@brickies.net> | 2016-08-23 16:48:39 -0400 |
|---|---|---|
| committer | Scott Moser <smoser@brickies.net> | 2016-08-23 16:48:39 -0400 |
| commit | 90de5dfa9685a9585b651c38b21274a9aa05ec38 (patch) | |
| tree | 238e33b0122e68154bc5773186b5938bac2fe34f /cloudinit/distros/parsers/sys_conf.py | |
| parent | 0ec34747b61845bfce806065dd126dcb56fe4672 (diff) | |
| parent | 5db46cfb68422b0c14d4a6c097553edd0016de3f (diff) | |
| download | vyos-cloud-init-90de5dfa9685a9585b651c38b21274a9aa05ec38.tar.gz vyos-cloud-init-90de5dfa9685a9585b651c38b21274a9aa05ec38.zip | |
merge trunk at 0.7.7~bzr1176
Diffstat (limited to 'cloudinit/distros/parsers/sys_conf.py')
| -rw-r--r-- | cloudinit/distros/parsers/sys_conf.py | 7 |
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: |
