[virt-tools-list] [virt-install PATCH 2/3] osdict: Use identify_media() instead of guess_os_from_media()

Fabiano Fidêncio fidencio at redhat.com
Wed Feb 6 13:21:30 UTC 2019


guess_os_from_media() has been deprecated for a while and
identify_media() should be used instead.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 virtinst/osdict.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index f74ead17..72edc4a6 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -207,10 +207,9 @@ class _OSDB(object):
             logging.debug("Error creating libosinfo media object: %s", str(e))
             return None
 
-        osobj, mediaobj = self._os_loader.get_db().guess_os_from_media(media)
-        if not osobj:
+        if not self._os_loader.get_db().identify_media(media):
             return None
-        return osobj.get_short_id(), mediaobj
+        return media.get_os().get_short_id(), media
 
     def list_os(self):
         """
-- 
2.20.1




More information about the virt-tools-list mailing list