1 cobbler/pxegen.py | 1 +
2 cobbler/utils.py | 21 +++++++++++++++++++++
3 2 files changed, 22 insertions(+)
5 diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py
6 index a9a5940..fbc0743 100644
7 --- a/cobbler/pxegen.py
8 +++ b/cobbler/pxegen.py
9 @@ -775,6 +775,7 @@ class PXEGen:
12 kopts = blended.get("kernel_options", dict())
13 + kopts = utils.revert_strip_none(kopts)
14 # support additional initrd= entries in kernel options.
16 append_line = ",%s" % kopts.pop("initrd")
17 diff --git a/cobbler/utils.py b/cobbler/utils.py
18 index fa6b534..56d21e6 100644
19 --- a/cobbler/utils.py
20 +++ b/cobbler/utils.py
21 @@ -2194,6 +2194,27 @@ def strip_none(data, omit_none=False):
25 +def revert_strip_none(data):
27 + Does the opposite to strip_none
29 + if isinstance(data, str) and data.strip() == '~':
32 + if isinstance(data, list):
35 + data2.append(revert_strip_none(x))
38 + if isinstance(data, dict):
40 + for key in data.keys():
41 + data2[key] = revert_strip_none(data[key])
46 def cli_find_via_xmlrpc(remote, otype, options):
48 Given an options object and a remote handle, find options matching