From 7f5671700644d5a424ce0c2d528062064759df91 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 11 Jan 2022 11:59:52 -0500 Subject: osdict: Remove dead code after get_kernel_url_argument usage This would still be used for old osinfo (mid 2019), and only for the case of installing 7+ year old RH distros. I think we can safely delete it. Signed-off-by: Cole Robinson --- virtinst/osdict.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/virtinst/osdict.py b/virtinst/osdict.py index 3e9cf6dd..bc4701ef 100644 --- a/virtinst/osdict.py +++ b/virtinst/osdict.py @@ -606,23 +606,8 @@ class _OsVariant(object): if self.distro not in ["centos", "rhel", "fedora"]: return None - # Red Hat distros - try: - if re.match(r"[0-9]+-unknown", self.version): - version = float(self.version.split("-")[0]) - else: - version = float(self.version) - except Exception: - # Can hit this for -rawhide or -unknown - version = 999 - - if self.distro in ["centos", "rhel"] and version < 7: - return "method" - - if self.distro in ["fedora"] and version < 19: - return "method" - - return "inst.repo" + # Default for RH distros, incase libosinfo data isn't complete + return "inst.repo" # pragma: no cover def _get_generic_location(self, treelist, arch, profile): if not hasattr(Libosinfo.Tree, "get_os_variants"): # pragma: no cover -- cgit v1.2.1