fix
This commit is contained in:
parent
87fdb8c190
commit
a0eb56421f
1 changed files with 2 additions and 2 deletions
|
|
@ -53,10 +53,10 @@ class InteractiveDecisionMaker(DecisionMaker):
|
|||
sys.stdout.write(f"{self.msg} ")
|
||||
try:
|
||||
raw = input()
|
||||
choice = int(ord(raw)-97) # may raise ValueError
|
||||
choice = ord(raw)-97 # may raise ValueError
|
||||
if choice >= 0 and choice < len(arr):
|
||||
return arr[choice]
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
print("Invalid option")
|
||||
return __choose()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue