mirror of https://github.com/ArduPilot/ardupilot
Tools: runplanetest.py: Resolve undefined name
Fixes: #6839 Undefined names can raise [NameError](https://docs.python.org/2/library/exceptions.html#exceptions.NameError) at runtime.
This commit is contained in:
parent
e5256d0bd5
commit
a906d31c23
|
@ -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'''
|
||||
|
@ -53,4 +53,3 @@ mavproxy.send('module load map\n')
|
|||
mavproxy.send('map set showsimpos 1\n')
|
||||
mavproxy.logfile = None
|
||||
mavproxy.interact()
|
||||
|
||||
|
|
Loading…
Reference in New Issue