Tools: runfliptest.sh: Resolve undefined name

Fixes: #6839 (partial fix)

Undefined names can raise [NameError](https://docs.python.org/2/library/exceptions.html#exceptions.NameError) at runtime.
This commit is contained in:
cclauss 2017-09-23 16:39:35 +08:00 committed by Peter Barker
parent d583bb9cbc
commit d2eec2db29
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ def wait_heartbeat(mav, timeout=10):
while time.time() < start_time+timeout:
if mav.recv_match(type='HEARTBEAT', blocking=True, timeout=0.5) is not None:
return
failure("Failed to get heartbeat")
raise Exception("Failed to get heartbeat")
def wait_mode(mav, modes, timeout=10):
'''wait for one of a set of flight modes'''