cli: fix config check against choices
This commit is contained in:
parent
10233dac30
commit
58f1a142ec
|
@ -58,8 +58,9 @@ def select_choice(value, choices, setting, key):
|
||||||
ivalue = to_int(value)
|
ivalue = to_int(value)
|
||||||
val = None
|
val = None
|
||||||
for choice in choices:
|
for choice in choices:
|
||||||
if value == choice or ivalue is not None and ivalue == choice:
|
if value == str(choice):
|
||||||
val = choice
|
val = choice
|
||||||
|
break
|
||||||
if val is not None:
|
if val is not None:
|
||||||
value = val
|
value = val
|
||||||
elif ivalue is not None and ivalue >= 0 and ivalue < len(choices):
|
elif ivalue is not None and ivalue >= 0 and ivalue < len(choices):
|
||||||
|
|
Loading…
Reference in New Issue