Skip to content

Commit a00143d

Browse files
committed
fix(copr): extract the build target instead of ‹next›
When applying the fixes from the ruff, I didn't realize it calls ‹next› on the ‹set› which doesn't make sense, so extract that one build target directly. Signed-off-by: Matej Focko <[email protected]>
1 parent a04d3f1 commit a00143d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packit_service/worker/helpers/build/copr_build.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,8 @@ def get_latest_fedora_stable_chroot(self) -> str:
627627
This is used as a chroot where the Copr source script will be run.
628628
"""
629629
latest_fedora_stable_chroot = get_aliases().get("fedora-stable")[-1]
630-
return next(
631-
self.api.copr_helper.get_valid_build_targets(latest_fedora_stable_chroot),
632-
)
630+
[build_target] = self.api.copr_helper.get_valid_build_targets(latest_fedora_stable_chroot)
631+
return build_target
633632

634633
def submit_copr_build(self, script: Optional[str] = None) -> tuple[int, str]:
635634
"""

0 commit comments

Comments
 (0)