mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Fixed extra [y/n] options in expect.
This commit is contained in:
parent
fb07813a55
commit
2e28200a41
@ -30,6 +30,7 @@
|
||||
###
|
||||
|
||||
def expect(prompt, possibilities, recursed=False):
|
||||
originalPrompt = prompt
|
||||
if recursed:
|
||||
print 'Sorry, that response was not an option.'
|
||||
if possibilities:
|
||||
@ -40,7 +41,7 @@ def expect(prompt, possibilities, recursed=False):
|
||||
if s in possibilities:
|
||||
return s.strip()
|
||||
else:
|
||||
return expect(prompt, possibilities, recursed=True)
|
||||
return expect(originalPrompt, possibilities, recursed=True)
|
||||
else:
|
||||
return s.strip()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user