autotest: fixed pexpect timeout

This commit is contained in:
Andrew Tridgell 2011-11-09 20:27:15 +11:00
parent f4da7e96d2
commit 87eefc0b34
1 changed files with 2 additions and 1 deletions

View File

@ -135,7 +135,8 @@ def expect_setup_callback(e, callback):
except pexpect.TIMEOUT:
e.expect_user_callback(e)
pass
raise pexpect.TIMEOUT
print("Timed out looking for %s" % pattern)
raise pexpect.TIMEOUT(timeout)
e.expect_user_callback = callback
e.expect_saved = e.expect