Fixed extra [y/n] options in expect.

This commit is contained in:
Jeremy Fincher 2003-08-19 13:36:14 +00:00
parent fb07813a55
commit 2e28200a41

View File

@ -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()