mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[utils] Also only allow two empty invalid inputs
This commit is contained in:
parent
af08f5d11b
commit
8512a9a7a1
|
@ -26,6 +26,9 @@ def get_int_choice(prompt, default=None, min_choice=None, max_choice=None, retur
|
||||||
if default is not None:
|
if default is not None:
|
||||||
return default
|
return default
|
||||||
else:
|
else:
|
||||||
|
if return_on_invalid:
|
||||||
|
return None
|
||||||
|
return_on_invalid = True
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if min_choice is not None and choice < min_choice:
|
if min_choice is not None and choice < min_choice:
|
||||||
|
|
Loading…
Reference in a new issue