[gclient] Fix SyntaxWarning when running py3.13

R=gavinmak@google.com

Bug: 40283283
Change-Id: I1a4a53f9d50eaa8601113485a07297c0863f7466
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6442907
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
changes/07/6442907/2
Josip Sokcevic 2 weeks ago committed by LUCI CQ
parent 68e296445e
commit 08fdf45d82

@ -3364,7 +3364,7 @@ def CMDgitmodules(parser, args):
# first time.
set_recursedeps = True
if os.path.exists(options.output_gitmodules):
dot_git_pattern = re.compile('^(\s*)url(\s*)=.*\.git$')
dot_git_pattern = re.compile(r'^(\s*)url(\s*)=.*\.git$')
with open(options.output_gitmodules) as f:
strip_git_suffix = not any(dot_git_pattern.match(l) for l in f)
set_recursedeps = any(

@ -433,7 +433,7 @@ class GitWrapper(SCMWrapper):
patch_rev_tokens = patch_rev.split('/')
change = patch_rev_tokens[-2]
# Parse the googlesource_url.
tokens = re.search('//(.+).googlesource.com/(.+?)(?:\.git)?$',
tokens = re.search(r'//(.+).googlesource.com/(.+?)(?:\.git)?$',
googlesource_url)
if not tokens or len(tokens.groups()) != 2:
# googlesource_url is not in the expected format.

Loading…
Cancel
Save