summaryrefslogtreecommitdiffstats
path: root/git_superproject.py
diff options
context:
space:
mode:
authorGavin Mak <gavinmak@google.com>2025-06-03 21:06:42 -0700
committerGavin Mak <gavinmak@google.com>2025-06-04 10:02:01 -0700
commit0cb88a8d791486d7c9bc86b6fdfdd26f64a37006 (patch)
treef5e9091a39146001c7b4fa3626398ad3045beb19 /git_superproject.py
parent08815ad3eb245872700201e03c47cb504d1dc3f9 (diff)
downloadgit-repo-0cb88a8d791486d7c9bc86b6fdfdd26f64a37006.tar.gz
git_superproject: Replace walrus operatorv2.55.1stablemain
It was released in python 3.8, and repo still supports 3.6. Bug: 422226033 Change-Id: I6bdd2cdbb074766ecfb1492d842c847781c4b264 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/481201 Tested-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'git_superproject.py')
-rw-r--r--git_superproject.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/git_superproject.py b/git_superproject.py
index d7d3c1af..687429ec 100644
--- a/git_superproject.py
+++ b/git_superproject.py
@@ -173,9 +173,11 @@ class Superproject:
173 Then the repo_id would be: 173 Then the repo_id would be:
174 android/platform/superproject 174 android/platform/superproject
175 """ 175 """
176 if review_url := self.remote.review: 176 review_url = self.remote.review
177 if review_url:
177 parsed_url = urllib.parse.urlparse(review_url) 178 parsed_url = urllib.parse.urlparse(review_url)
178 if netloc := parsed_url.netloc: 179 netloc = parsed_url.netloc
180 if netloc:
179 parts = netloc.split("-review", 1) 181 parts = netloc.split("-review", 1)
180 host = parts[0] 182 host = parts[0]
181 rev = GitRefs(self._work_git).get("HEAD") 183 rev = GitRefs(self._work_git).get("HEAD")