From 3d38cd3c41e844451f39b41d72ded0f3b989ec5b Mon Sep 17 00:00:00 2001 From: Jeremy Leconte Date: Tue, 16 Aug 2022 15:13:58 +0200 Subject: [PATCH] Migrate mb script to python3. Change-Id: Ief72dd7f9c5ca65c6ce67d1784c6d8321554a07a Bug: b/216091827 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271294 Reviewed-by: Evan Shrubsole Reviewed-by: Mirko Bonadei Commit-Queue: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#37809} --- tools_webrtc/mb/mb | 2 +- tools_webrtc/mb/mb_unittest.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools_webrtc/mb/mb b/tools_webrtc/mb/mb index d3a0cdf019..007d23cb64 100755 --- a/tools_webrtc/mb/mb +++ b/tools_webrtc/mb/mb @@ -5,4 +5,4 @@ base_dir=$(dirname "$0") -PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/mb.py" "$@" +PYTHONDONTWRITEBYTECODE=1 exec python3 "$base_dir/mb.py" "$@" diff --git a/tools_webrtc/mb/mb_unittest.py b/tools_webrtc/mb/mb_unittest.py index 115d329b3a..109d2bcb2d 100755 --- a/tools_webrtc/mb/mb_unittest.py +++ b/tools_webrtc/mb/mb_unittest.py @@ -91,9 +91,9 @@ class FakeMBW(mb.WebRTCMetaBuildWrapper): abpath = self._AbsPath(path) self.files[abpath] = contents - def Call(self, cmd, env=None, buffer_output=True, stdin=None): + def Call(self, cmd, env=None, capture_output=True, stdin=None): del env - del buffer_output + del capture_output del stdin self.calls.append(cmd) if self.cmds: @@ -231,11 +231,11 @@ def CreateFakeMBW(files=None, win32=False): mbw.files[path] = contents if path.endswith('.runtime_deps'): - def FakeCall(cmd, env=None, buffer_output=True, stdin=None): + def FakeCall(cmd, env=None, capture_output=True, stdin=None): # pylint: disable=cell-var-from-loop del cmd del env - del buffer_output + del capture_output del stdin mbw.files[path] = contents return 0, '', ''