summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2022-01-11 11:59:52 -0500
committerCole Robinson <crobinso@redhat.com>2022-01-11 12:32:22 -0500
commit7f5671700644d5a424ce0c2d528062064759df91 (patch)
treeeb13d3a1ec9b3c31bde218d8d556bc401e257fec
parent019c621b62ac9a410f3983726a69a55fffadc517 (diff)
downloadvirt-manager-7f5671700644d5a424ce0c2d528062064759df91.tar.gz
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 <crobinso@redhat.com>
-rw-r--r--virtinst/osdict.py19
1 files 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