Skip to content

Commit

Permalink
Merge pull request #50 from SUSE-Enceladus/no_fail_on_missing_metadata
Browse files Browse the repository at this point in the history
Don't fail on missing metadata
  • Loading branch information
smarlowucf committed Feb 28, 2024
2 parents 7d19fb6 + 1f9c6a4 commit a55f8be
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions obs_img_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,22 @@ def _set_image_version(self):
self._image_release = version.obs_build

@retry(DownloadMetadataFileExceptionOBS)
def get_image_packages_metadata(self):
def get_image_packages_metadata(self) -> dict:
has_error = None
result_packages = {}
try:
result_packages = self.parse_report_file()
except DownloadMetadataFileExceptionOBS:
result_packages = self.parse_packages_file()
try:
result_packages = self.parse_packages_file()
except DownloadMetadataFileExceptionOBS as issue:
has_error = issue

if self.conditions and has_error:
self.log_callback.error(
f'Cannot verify {self.conditions} without metadata'
)
raise OBSImageConditionsException(has_error)

return result_packages

Expand Down

0 comments on commit a55f8be

Please sign in to comment.