Fix a SyntaxWarning using raw strings

137: SyntaxWarning: invalid escape sequence '\d'.

Bug: 40283283
Change-Id: I09864101f572ecc1a0c6abf2d6cf2653129d3b87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7058230
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Ho Cheung <hocheung@chromium.org>
changes/30/7058230/2
Ho Cheung 3 days ago committed by LUCI CQ
parent 7709d4cdd7
commit 16dfe4717b

@ -134,7 +134,7 @@ def upload_to_google_storage(file: str, base_url: str, object_name: str,
raise Exception(
code, 'Encountered error on uploading %s to %s\n%s' %
(file, file_url, err))
pattern = re.escape(file_url) + '#(?P<generation>\d+)'
pattern = re.escape(file_url) + r'#(?P<generation>\d+)'
# The geneartion number is printed as part of the progress / status info
# which gsutil outputs to stderr to keep separated from any final output
# data.

Loading…
Cancel
Save