From d2eec2db299cd6cd1fb03dd11749305e77a62a61 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sat, 23 Sep 2017 16:39:35 +0800 Subject: [PATCH] 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. --- Tools/scripts/runfliptest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/scripts/runfliptest.sh b/Tools/scripts/runfliptest.sh index 72a1761b22..1aa638307a 100755 --- a/Tools/scripts/runfliptest.sh +++ b/Tools/scripts/runfliptest.sh @@ -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'''