Let's pass the OsinfoMedia object down to the OSInstallScript class so it can be used, later on, to generate the install-script and kernel command-line specifically for the media being used. Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- virtinst/install/unattended.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virtinst/install/unattended.py b/virtinst/install/unattended.py index 8e6a20c5..98bcbb21 100644 --- a/virtinst/install/unattended.py +++ b/virtinst/install/unattended.py @@ -125,9 +125,10 @@ class OSInstallScript: return True return False # pragma: no cover - def __init__(self, script, osobj): + def __init__(self, script, osobj, osinfomediaobj): self._script = script self._osobj = osobj + self._osinfomediaobj = osinfomediaobj self._config = None if not OSInstallScript.have_new_libosinfo(): # pragma: no cover @@ -316,7 +317,9 @@ def prepare_install_script(guest, unattended_data, rawscript = _lookup_rawscript(guest.osinfo, unattended_data.profile, os_media) - script = OSInstallScript(rawscript, guest.osinfo) + + osinfomediaobj = os_media.get_osinfo_media() if os_media else None + script = OSInstallScript(rawscript, guest.osinfo, osinfomediaobj) script.set_preferred_injection_method(injection_method) -- 2.21.0 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list