From 5fbb385c3127b744420b824d929ff438c9d9136c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 19 Mar 2018 11:21:59 +1100 Subject: [PATCH] Tools: autotest: avoid exception when using Python3 on MacOSX File "./Tools/autotest/sim_vehicle.py", line 999, in location) File "./Tools/autotest/sim_vehicle.py", line 573, in start_vehicle run_in_terminal_window(autotest, cmd_name, cmd) File "./Tools/autotest/sim_vehicle.py", line 476, in run_in_terminal_window tabs = p.findall(out) TypeError: cannot use a string pattern on a bytes-like object SIM_VEHICLE: Killing tasks --- Tools/autotest/sim_vehicle.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/autotest/sim_vehicle.py b/Tools/autotest/sim_vehicle.py index d6f98e1425..8f1c17f8e2 100755 --- a/Tools/autotest/sim_vehicle.py +++ b/Tools/autotest/sim_vehicle.py @@ -468,6 +468,7 @@ def run_in_terminal_window(autotest, name, cmd): if under_macos() and os.environ.get('DISPLAY'): # on MacOS record the window IDs so we can close them later out = subprocess.Popen(runme, stdout=subprocess.PIPE).communicate()[0] + out = out.decode('utf-8') import re p = re.compile('tab 1 of window id (.*)')