From 3b9d2d8557f5a9b82a9acf240bd21668b477fa98 Mon Sep 17 00:00:00 2001 From: Dirk Pranke Date: Wed, 12 May 2021 16:26:04 +0000 Subject: [PATCH] Fix a Python3-compatibility issue in get_toolchain_if_necessary. Bug: 1207012 Change-Id: I9205089c3a7d9f2d3e2eb9aac7ef6da9ae9b0876 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2890330 Commit-Queue: Dirk Pranke Reviewed-by: Bruce Dawson --- win_toolchain/get_toolchain_if_necessary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py index 2a1b76d22..c67d05d68 100755 --- a/win_toolchain/get_toolchain_if_necessary.py +++ b/win_toolchain/get_toolchain_if_necessary.py @@ -560,7 +560,7 @@ def main(): version_file = os.path.join(toolchain_target_dir, 'VS_VERSION') vc_dir = os.path.join(toolchain_target_dir, 'VC') with open(version_file, 'rb') as f: - vs_version = f.read().strip() + vs_version = f.read().decode('utf-8').strip() # Touch the VC directory so we can use its timestamp to know when this # version of the toolchain has been used for the last time. os.utime(vc_dir, None)