[virt-tools-list] [virt-manager PATCH v2 19/25] unattended: Add media to generate_install_script()

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


Let's pass media down to generate_install_script_output() and
generate_install_script_cmdline().

For now it's a no-op change as generate_install_script() is never called
with a media being passed.

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

diff --git a/virtinst/unattended.py b/virtinst/unattended.py
index 9550beef..dd8e2033 100644
--- a/virtinst/unattended.py
+++ b/virtinst/unattended.py
@@ -20,7 +20,7 @@ class UnattendedData():
     user_password = None
 
 
-def generate_install_script(guest, unattended_data):
+def generate_install_script(guest, unattended_data, media=None):
     script = guest.osinfo.get_install_script(unattended_data.profile)
 
     # For all tree based installations we're going to perform initrd injection
@@ -37,9 +37,10 @@ def generate_install_script(guest, unattended_data):
         os.makedirs(stratch, 0o751)
 
     guest.osinfo.generate_install_script_output(script, config,
-            gio.File.new_for_path(scratch))
+            gio.File.new_for_path(scratch), media)
 
     path = os.path.join(scratch, script.get_expected_filename())
-    cmdline = guest.osinfo.generate_install_script_cmdline(script, config)
+    cmdline = guest.osinfo.generate_install_script_cmdline(
+            script, config, media)
 
     return path, cmdline
-- 
2.20.1




More information about the virt-tools-list mailing list