Skip to content

Commit

Permalink
rubicon: Give a better error message if a repo/suite was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ximion committed Mar 23, 2024
1 parent ebd1bea commit 790ef91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/laniakea/archive/pkgimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,9 +1081,15 @@ def _process_changes_internal(self, fname: T.PathUnion) -> UploadChangesResult:
ArchiveRepoSuiteSettings.repo.has(id=self._repo.id),
ArchiveRepoSuiteSettings.suite.has(name=suite_name),
)
.one()
.one_or_none()
)

if not rss:
return UploadChangesResult(
False,
uploader,
error='No repository/suite configuration found for {}:{}.'.format(self._repo.name, suite_name),
)
if rss.frozen:
return UploadChangesResult(
False,
Expand Down

0 comments on commit 790ef91

Please sign in to comment.