Commit c1ad813c authored by Raul Tambre's avatar Raul Tambre Committed by Commit Bot

//build/vs_toolchain.py: Fix SyntaxWarnings about invalid escape sequences

Warnings when running "gn gen" on Python 3.8:
C:/Google/chromium/src/build/vs_toolchain.py:257: SyntaxWarning: invalid escape sequence \.
  if re.match('10\.\d+\.\d+\.\d+', directory):
C:/Google/chromium/src/build/vs_toolchain.py:281: SyntaxWarning: invalid escape sequence \.
  if re.match('14\.\d+\.\d+', directory):
C:/Google/chromium/src/build/vs_toolchain.py:257: SyntaxWarning: invalid escape sequence \.
  if re.match('10\.\d+\.\d+\.\d+', directory):
C:/Google/chromium/src/build/vs_toolchain.py:281: SyntaxWarning: invalid escape sequence \.
  if re.match('14\.\d+\.\d+', directory):
C:/Google/chromium/src/build/toolchain/win\..\..\vs_toolchain.py:257: SyntaxWarning: invalid escape sequence \.
  if re.match('10\.\d+\.\d+\.\d+', directory):
C:/Google/chromium/src/build/toolchain/win\..\..\vs_toolchain.py:281: SyntaxWarning: invalid escape sequence \.
  if re.match('14\.\d+\.\d+', directory):

Bug: 941669
Change-Id: I2ab9fc1e404c2bdeba606c6391f8ac8149d92e62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585889Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#654764}
parent 2e136b35
...@@ -254,7 +254,7 @@ def _CopyUCRTRuntime(target_dir, source_dir, target_cpu, dll_pattern, suffix): ...@@ -254,7 +254,7 @@ def _CopyUCRTRuntime(target_dir, source_dir, target_cpu, dll_pattern, suffix):
sdk_redist_root_version = os.path.join(sdk_redist_root, directory) sdk_redist_root_version = os.path.join(sdk_redist_root, directory)
if not os.path.isdir(sdk_redist_root_version): if not os.path.isdir(sdk_redist_root_version):
continue continue
if re.match('10\.\d+\.\d+\.\d+', directory): if re.match(r'10\.\d+\.\d+\.\d+', directory):
source_dir = os.path.join(sdk_redist_root_version, target_cpu, 'ucrt') source_dir = os.path.join(sdk_redist_root_version, target_cpu, 'ucrt')
break break
_CopyRuntimeImpl(os.path.join(target_dir, 'ucrtbase' + suffix), _CopyRuntimeImpl(os.path.join(target_dir, 'ucrtbase' + suffix),
...@@ -278,7 +278,7 @@ def FindVCComponentRoot(component): ...@@ -278,7 +278,7 @@ def FindVCComponentRoot(component):
for directory in vc_component_msvc_contents: for directory in vc_component_msvc_contents:
if not os.path.isdir(os.path.join(vc_component_msvc_root, directory)): if not os.path.isdir(os.path.join(vc_component_msvc_root, directory)):
continue continue
if re.match('14\.\d+\.\d+', directory): if re.match(r'14\.\d+\.\d+', directory):
return os.path.join(vc_component_msvc_root, directory) return os.path.join(vc_component_msvc_root, directory)
raise Exception('Unable to find the VC %s directory.' % component) raise Exception('Unable to find the VC %s directory.' % component)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment