From 3a859b4173167599520f08ba3c3cdb982029742c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 7 Nov 2022 08:44:03 +1100 Subject: [PATCH] Tools: fix bisect helper Python3 made stringification different, showing up this problem --- Tools/autotest/bisect-helper.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tools/autotest/bisect-helper.py b/Tools/autotest/bisect-helper.py index 1926b47f47..17dbd02c3d 100755 --- a/Tools/autotest/bisect-helper.py +++ b/Tools/autotest/bisect-helper.py @@ -124,8 +124,8 @@ class Bisect(object): while True: x = p.stdout.readline() if len(x) == 0: - returncode = os.waitpid(p.pid, 0) - if returncode: + waitpid_result = os.waitpid(p.pid, 0) + if waitpid_result: break # select not available on Windows... probably... time.sleep(0.1) @@ -135,12 +135,12 @@ class Bisect(object): self.program_output += x x = x.rstrip() print("%s: %s" % (prefix, x)) - (_, status) = returncode + (pid, status) = waitpid_result if status != 0: self.progress("Process failed (%s)" % - str(returncode)) + str(waitpid_result)) raise subprocess.CalledProcessError( - returncode, cmd_list) + status, cmd_list) def build(self): '''run ArduCopter build. May exit with skip or fail'''