[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>
This commit is contained in:
Josip Sokcevic
2025-04-09 11:10:08 -07:00
committed by LUCI CQ
parent 68e296445e
commit 08fdf45d82
2 changed files with 2 additions and 2 deletions

View File

@@ -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.