osdict: Return a _OsTree instead of OsinfoTree when guessing an OS

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.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2019-07-16 17:14:25 +02:00 committed by Cole Robinson
parent 7fee11a29c
commit 0e60a25066

View File

@ -263,7 +263,7 @@ class _OSDB(object):
osobj, treeobj = self._os_loader.get_db().guess_os_from_tree(tree) osobj, treeobj = self._os_loader.get_db().guess_os_from_tree(tree)
if not osobj: if not osobj:
return None # pragma: no cover return None # pragma: no cover
return osobj.get_short_id(), treeobj return osobj.get_short_id(), _OsTree(treeobj)
def list_os(self): def list_os(self):
""" """