Let's add an internal Libosinfo.OsMedia attribute to the InstallerTreeMedia object. By doing this, it'll help us in the future to: - easily get the media's kernel/initrd path - pass down the media to the generate_install_script() Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx> --- virtinst/installertreemedia.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/virtinst/installertreemedia.py b/virtinst/installertreemedia.py index 2484e88c..2988c198 100644 --- a/virtinst/installertreemedia.py +++ b/virtinst/installertreemedia.py @@ -80,6 +80,8 @@ class InstallerTreeMedia(object): self._tmpfiles = [] self._tmpvols = [] + # A Libosinfo.OsinfoMedia + self._media = None self._unattended_data = None self._media_type = MEDIA_ISO @@ -96,6 +98,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