From be8e84b3639d41202a4e1ce7626b2053498fecdb Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 17 Jul 2017 10:20:40 -0400 Subject: 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. --- cloudinit/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit') 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): -- cgit v1.2.3