Merge pull request #250 from insanemal/insanemal-patch-2
OOB in generic_selection
This commit is contained in:
commit
e5c118239b
|
|
@ -220,7 +220,7 @@ def generic_select(options, input_text="Select one of the above by index or abso
|
||||||
return None
|
return None
|
||||||
elif selected_option.isdigit():
|
elif selected_option.isdigit():
|
||||||
selected_option = int(selected_option)
|
selected_option = int(selected_option)
|
||||||
if selected_option >= len(options):
|
if selected_option > len(options):
|
||||||
raise RequirementError(f'Selected option "{selected_option}" is out of range')
|
raise RequirementError(f'Selected option "{selected_option}" is out of range')
|
||||||
selected_option = options[selected_option]
|
selected_option = options[selected_option]
|
||||||
elif selected_option in options:
|
elif selected_option in options:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue