Skip to content

Commit

Permalink
frontend: don't traceback upon exc*arch absence in results
Browse files Browse the repository at this point in the history
This actually causes error 500 upon "update" request from copr backend
background worker, eventually leading to never-stopped builder process.

Relates: #2841
  • Loading branch information
praiskup committed Aug 14, 2023
1 parent e9d4613 commit 31b4a58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/coprs_frontend/coprs/logic/builds_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,11 +1034,12 @@ def finish(chroot, status):
for chroot in build.build_chroots:
arch = chroot.mock_chroot.arch

exclusivearch = upd_dict["results"]["exclusivearch"]
exclusivearch = upd_dict["results"].get("exclusivearch")
if exclusivearch and arch not in exclusivearch:
finish(chroot, StatusEnum("skipped"))

if arch in upd_dict["results"]["excludearch"]:
excludearch = upd_dict["results"].get("excludearch")
if arch in excludearch:
finish(chroot, StatusEnum("skipped"))

cls.process_update_callback(build)
Expand Down

0 comments on commit 31b4a58

Please sign in to comment.