From a465627c262fa5a7c053ab2d32c220f24f51ca10 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 12 Oct 2022 14:42:23 -0700 Subject: [PATCH 1/3] RHSM Facts can only be strings or booleans. RHSM facts are limited to string and boolean types. So we need to change None's to "null". --- convert2rhel/breadcrumbs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/convert2rhel/breadcrumbs.py b/convert2rhel/breadcrumbs.py index 8937fd4..f6bd7b4 100644 --- a/convert2rhel/breadcrumbs.py +++ b/convert2rhel/breadcrumbs.py @@ -131,12 +131,18 @@ class Breadcrumbs(object): def _set_source_os(self): """Set the source os release information.""" self.source_os = system_info.get_system_release_info() + if self.source_os["id"] is None: + # rhsm facts can only be strings or booleans + self.source_os["id"] = "null" def _set_target_os(self): """Set the target os release information.""" # Reading the system-release file again to get the target os information. system_release_content = system_info.get_system_release_file_content() self.target_os = system_info.get_system_release_info(system_release_content) + if self.target_os["id"] is None: + # rhsm facts can only be strings or booleans + self.target_os["id"] = "null" @property def data(self): -- 2.37.3