[virt-tools-list] [virt-manager PATCH v2 16/25] osdict: Add media to get_install_script()

Fabiano Fidêncio fidencio at redhat.com
Tue Feb 26 09:43:47 UTC 2019


It'll become handy whenever we start handling unattended installations
from medias. For now, if a valid media is passed, it just return None.

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

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 40386546..f32dc350 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -511,7 +511,7 @@ class _OsVariant(object):
         # the right one.
         return filtered_treelist.get_nth(0).get_url()
 
-    def get_install_script(self, profile):
+    def get_install_script(self, profile, media=None):
         def _get_install_script(script_list):
             if script_list.get_length == 0:
                 raise RuntimeError(
@@ -539,6 +539,9 @@ class _OsVariant(object):
         if not self._os:
             return None
 
+        if media:
+            return None
+
         return _get_install_script(self._os.get_install_script_list())
 
     def set_install_script_preferred_injection_method(self, script, method):
-- 
2.20.1




More information about the virt-tools-list mailing list