service: Address lint issues
Specifically,
C0301: Line too long (83/80) (line-too-long)
W0612: Unused variable 'branch' (unused-variable)
BUG=none
TEST=./run_tests
Change-Id: I9bd90b67a9f87a0dc156f2ae95733580b2d6e97a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/6272841
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/service/packages.py b/service/packages.py
index 5a19117..0f75e91 100644
--- a/service/packages.py
+++ b/service/packages.py
@@ -1311,9 +1311,9 @@
For instance:
- GS_MIRROR/distfiles/starbase-head-20230101-r00-rc001/starbase-foobar.tar.zst
+ GS_MIRROR/distfiles/starbase-head-20230101-r00-rc001/starbase-foo.tar.zst
or
- GS_MIRROR/distfiles/starbase-release-20230101-r00-rc001/starbase-foobar.tar.zst
+ GS_MIRROR/distfiles/starbase-release-20230101-r00-rc001/starbase-foo.tar.zst
Note that each directory can contain multiple tar files. The "refs"
parameter is a list with one element for each tar file (or package). Only
@@ -1341,9 +1341,9 @@
# We're ignoring the meaning of the `ref` fields and reusing them for
# our purposes. See absurdly long comment above.
tarfile_name, tarfile_hash = ref.path.split("/", 1)
- branch = ""
if len(ref.ref.split("/")) == 3:
- branch, category, package_name = ref.ref.split("/", 2)
+ # First in the split is the "branch".
+ _, category, package_name = ref.ref.split("/", 2)
else:
category, package_name = ref.ref.split("/", 1)
# Helium ARCVM artifacts uprev the ebuild in the Helium overlay.