Fixed generic_select() to accept (and break on) empty selects.
This commit is contained in:
parent
abfeeb8dd0
commit
b3bcf54a2c
|
|
@ -24,7 +24,9 @@ def generic_select(options, input_text="Select one of the above by index or abso
|
||||||
print(f"{index}: {option}")
|
print(f"{index}: {option}")
|
||||||
|
|
||||||
selected_option = input(input_text)
|
selected_option = input(input_text)
|
||||||
if selected_option.isdigit():
|
if len(selected_option.strip()) <= 0:
|
||||||
|
return None
|
||||||
|
elif selected_option.isdigit():
|
||||||
selected_option = options[int(selected_option)]
|
selected_option = options[int(selected_option)]
|
||||||
elif selected_option in options:
|
elif selected_option in options:
|
||||||
pass # We gave a correct absolute value
|
pass # We gave a correct absolute value
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ while 1:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
# Optionally configure one network interface.
|
# Optionally configure one network interface.
|
||||||
while 1:
|
#while 1:
|
||||||
interfaces = archinstall.list_interfaces() # {MAC: Ifname}
|
interfaces = archinstall.list_interfaces() # {MAC: Ifname}
|
||||||
archinstall.storage['_guided']['network'] = None
|
archinstall.storage['_guided']['network'] = None
|
||||||
|
|
||||||
|
|
@ -211,6 +211,7 @@ while 1:
|
||||||
else:
|
else:
|
||||||
archinstall.storage['_guided']['network'] = {'nic': nic}
|
archinstall.storage['_guided']['network'] = {'nic': nic}
|
||||||
|
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print('This is your chosen configuration:')
|
print('This is your chosen configuration:')
|
||||||
archinstall.log("-- Guided template chosen (with below config) --", level=archinstall.LOG_LEVELS.Debug)
|
archinstall.log("-- Guided template chosen (with below config) --", level=archinstall.LOG_LEVELS.Debug)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue