From 58387b174918313aad4522cff7aebfcbdc93dbae Mon Sep 17 00:00:00 2001 From: Mikhail Sandakov Date: Thu, 2 Jan 2025 08:43:07 +0200 Subject: [PATCH] Do not retrieve data from a non-existent kernelcare file --- centos2almaconverter/actions/extensions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/centos2almaconverter/actions/extensions.py b/centos2almaconverter/actions/extensions.py index baedcfb..a3744fa 100644 --- a/centos2almaconverter/actions/extensions.py +++ b/centos2almaconverter/actions/extensions.py @@ -97,6 +97,9 @@ def _is_required(self) -> bool: return self._is_kernelcare_extension_installed() and self._is_kernelcare_gpg_key_missing() def _get_kernelcare_gpg_keys_urls(self) -> typing.List[str]: + if not os.path.exists(self.kernelcare_repofile): + return [] + result = [] for repo_id, _, _, _, _, additional in rpm.extract_repodata(self.kernelcare_repofile): if repo_id != "kernelcare":