Fixed expected return value from ask_for_disk_layout(). I think I have to throw an eye on generic_select() and it's expected return value in general.. But that's later.

This commit is contained in:
Anton Hvornum 2021-03-08 14:51:18 +01:00
parent 94daa8b98b
commit 476006abe8
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ def ask_for_disk_layout():
'abort' : 'Abort the installation.'
}
return generic_select(options.values(), "Found partitions on the selected drive, (select by number) what you want to do: ")
value = generic_select(options.values(), "Found partitions on the selected drive, (select by number) what you want to do: ")
return next((key for key, val in options.items() if val == value), None)
def generic_select(options, input_text="Select one of the above by index or absolute value: ", sort=True):
"""