Skip to content

Commit

Permalink
frontend: log missing copr chroot in get_build_record
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Aug 11, 2023
1 parent 9941808 commit ddba976
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion frontend/coprs_frontend/coprs/logic/complex_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ def get_copr_chroot_safe(copr, chroot_name):

if not chroot:
raise ObjectNotFound(
message="Chroot name {} does not exist.".format(chroot_name))
message="Chroot name {0} does not exist in Copr {1}."
.format(chroot_name, copr.full_name)
)

return chroot

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from coprs.logic.builds_logic import BuildsLogic
from coprs.logic.complex_logic import ComplexLogic, BuildConfigLogic
from coprs.logic.packages_logic import PackagesLogic
from coprs.logic.coprs_logic import MockChrootsLogic, CoprChrootsLogic
from coprs.logic.coprs_logic import MockChrootsLogic
from coprs.exceptions import CoprHttpException, ObjectNotFound
from coprs.helpers import streamed_json

Expand Down Expand Up @@ -168,7 +168,7 @@ def get_build_record(task, for_backend=False):
"repo_priority": task.build.copr.repo_priority
})

copr_chroot = CoprChrootsLogic.get_by_name_safe(task.build.copr, task.mock_chroot.name)
copr_chroot = ComplexLogic.get_copr_chroot_safe(task.build.copr, task.mock_chroot.name)
modules = copr_chroot.module_setup_commands
if modules:
build_record["modules"] = {'toggle': modules}
Expand Down

0 comments on commit ddba976

Please sign in to comment.