autotest: fixed pexpect timeout

This commit is contained in:
Andrew Tridgell 2011-11-09 20:27:15 +11:00
parent 97bc4e90a3
commit 6eb25d2c25

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