Let's add an internal Libosinfo.OsMedia attribute to the InstallerTreeMedia object. By doing this, it'll help us to: - easily get the media's kernel and initrd path - pass down the Libosinfo.Media to the generate_install_script() method Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- virtinst/installertreemedia.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virtinst/installertreemedia.py b/virtinst/installertreemedia.py index ab2f67eb..39f5ac0f 100644 --- a/virtinst/installertreemedia.py +++ b/virtinst/installertreemedia.py @@ -81,6 +81,7 @@ class InstallerTreeMedia(object): self._tmpvols = [] self._unattended_data = None + self._media = None self._media_type = MEDIA_ISO if (not self.conn.is_remote() and @@ -96,6 +97,9 @@ class InstallerTreeMedia(object): if self._media_type == MEDIA_ISO: InstallerTreeMedia.validate_path(self.conn, self.location) + osguess = OSDB.guess_os_by_iso(self.location) + if osguess: + self._media = osguess[1] ######################## -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list