Skip to content
Snippets Groups Projects
Commit 873bbad8 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug in sysprep param handling in dialog_menu

If the needed sysprep parameters had all default values,
snf-image-creator would crash when trying to run the image
customization. This bug could not be triggered from the current os_type
classes.
parent 16128dd8
No related branches found
No related tags found
No related merge requests found
...@@ -690,7 +690,14 @@ def sysprep_params(session): ...@@ -690,7 +690,14 @@ def sysprep_params(session):
advanced_names = [k for k, v in needed.items() if v.default is not None] advanced_names = [k for k, v in needed.items() if v.default is not None]
while 1: while 1:
code, output = print_form(simple_names, extra_button=True)
if len(simple_names) > 0:
extra_button = len(advanced_names) > 0
code, output = print_form(simple_names, extra_button=extra_button)
choice = simple_names
elif len(advanced_names) > 0:
code, output = print_form(advanced_names, extra_button=False)
choice = advanced_names
if code in (d.DIALOG_CANCEL, d.DIALOG_ESC): if code in (d.DIALOG_CANCEL, d.DIALOG_ESC):
return False return False
...@@ -703,7 +710,7 @@ def sysprep_params(session): ...@@ -703,7 +710,7 @@ def sysprep_params(session):
break break
continue continue
if check_params(simple_names, output): if check_params(choice, output):
break break
return True return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment