[virt-tools-list] [virt-manager PATCH 1/9] osdict: Add _OsTree() class

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


Similarly to the _OsMedia() class, let's create a _OsTree() class which,
at least for now, has only one method that returns the OsinfoTree
object.

Although this class & method are not extrictly needed, having them makes
the code more consistent.

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

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index b0442527..983f8e83 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -643,3 +643,11 @@ class _OsMedia(object):
 
     def get_osinfo_media(self):
         return self._media
+
+
+class _OsTree(object):
+    def __init__(self, osinfo_tree):
+        self._tree = osinfo_tree
+
+    def get_osinfo_tree(self):
+        return self._tree
-- 
2.21.0




More information about the virt-tools-list mailing list