diff options
author | Scott Moser <smoser@brickies.net> | 2017-07-17 10:20:40 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-07-17 10:20:40 -0400 |
commit | be8e84b3639d41202a4e1ce7626b2053498fecdb (patch) | |
tree | 5f7a13f3feade970d9584cd9cfdf4473230363a1 /cloudinit | |
parent | 7ed3cb3a699923623e75ad15c1c5d88abba48d00 (diff) | |
download | vyos-cloud-init-be8e84b3639d41202a4e1ce7626b2053498fecdb.tar.gz vyos-cloud-init-be8e84b3639d41202a4e1ce7626b2053498fecdb.zip |
Support comments in content read by load_shell_content.
load_shell_content previously would not allow shell comment characters
in the content being parsed. If comments=True is not passed then an
exception would previously be raised as the line would not be guaranteed to
have an '=' in it.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index b486e182..f570b9d3 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -2529,7 +2529,7 @@ def load_shell_content(content, add_empty=False, empty_val=None): if PY26 and isinstance(blob, six.text_type): # Older versions don't support unicode input blob = blob.encode("utf8") - return shlex.split(blob) + return shlex.split(blob, comments=True) data = {} for line in _shlex_split(content): |