diff --git a/gclient.py b/gclient.py index 2b6471e725..58d5aee1e8 100755 --- a/gclient.py +++ b/gclient.py @@ -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( diff --git a/gclient_scm.py b/gclient_scm.py index 70b4f39202..0c5eee5a54 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -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.