If the ostype returned by libguestfs is valid and distro in unknown,
don't print the distro at all.
"image creation process?\n\nChoose <Wizard> to run the wizard," \
" <Expert> to run the snf-image-creator in expert mode or " \
"press ESC to quit the program." \
- % (image.ostype if image.ostype == image.distro else "%s (%s)" %
+ % (image.ostype if image.ostype == image.distro or
+ image.distro == "unknown" else "%s (%s)" %
(image.ostype, image.distro))
update_background_title(session)
self.ostype = self.g.inspect_get_type(self.root)
self.distro = self.g.inspect_get_distro(self.root)
- self.out.success('found a(n) %s system' % self.distro)
+ self.out.success(
+ 'found a(n) %s system' %
+ self.ostype if self.distro == "unknown" else self.distro)
def _get_os(self):
"""Return an OS class instance for this image"""