diff options
-rw-r--r-- | cloudinit/net/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py index 7d7f274d..e13ca470 100644 --- a/cloudinit/net/__init__.py +++ b/cloudinit/net/__init__.py @@ -288,8 +288,10 @@ def parse_net_config(path): def _load_shell_content(content, add_empty=False, empty_val=None): - """Given the content of a klibc created /run/net*.conf file, return - its data in dictionary form.""" + """Given shell like syntax (key=value\nkey2=value2\n) in content + return the data in dictionary form. If 'add_empty' is True + then add entries in to the returned dictionary for 'VAR=' + variables. Set their value to empty_val.""" data = {} for line in shlex.split(content): key, value = line.split("=", 1) |