[virt-tools-list] [virt-manager PATCH 2/9] osdict: Return a _OsTree instead of OsinfoTree when guessing an OS

Fabiano Fidêncio fidencio at redhat.com
Tue Jul 16 15:14:25 UTC 2019


Instead of returning an OsinfoTree, let's be consistent with what we
already do in guess_os_from_iso() and return our internal _OsTree
object.

This change doesn't affect any code as the only place using it doesn't
care about the returned tree object.

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

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 983f8e83..3b71ac31 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -263,7 +263,7 @@ class _OSDB(object):
         osobj, treeobj = self._os_loader.get_db().guess_os_from_tree(tree)
         if not osobj:
             return None  # pragma: no cover
-        return osobj.get_short_id(), treeobj
+        return osobj.get_short_id(), _OsTree(treeobj)
 
     def list_os(self):
         """
-- 
2.21.0




More information about the virt-tools-list mailing list