cli: fix config check against choices

This commit is contained in:
Peter F. Patel-Schneider 2021-03-18 09:17:23 -04:00
parent 10233dac30
commit 58f1a142ec
1 changed files with 2 additions and 1 deletions

View File

@ -58,8 +58,9 @@ def select_choice(value, choices, setting, key):
ivalue = to_int(value)
val = None
for choice in choices:
if value == choice or ivalue is not None and ivalue == choice:
if value == str(choice):
val = choice
break
if val is not None:
value = val
elif ivalue is not None and ivalue >= 0 and ivalue < len(choices):