summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/image_installer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index 2a9830f37..e42d5b856 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -493,12 +493,13 @@ def setup_grub(root_dir: str) -> None:
def get_cli_kernel_options(config_file: str) -> list:
config = ConfigTree(read_file(config_file))
config_dict = loads(config.to_json())
+ cmdline_options = []
kernel_options = dict_search('system.option.kernel', config_dict)
if kernel_options is None:
- kernel_options = {}
+ return cmdline_options
+
k_cpu_opts = kernel_options.get('cpu', {})
k_memory_opts = kernel_options.get('memory', {})
- cmdline_options = []
# XXX: This code path and if statements must be kept in sync with the Kernel
# option handling in system_options.py:generate(). This occurance is used