create: Fix container install

We hide the OS selection UI for container installs, the new code
wasn't taking this into account
This commit is contained in:
Cole Robinson 2018-05-01 15:24:49 -04:00
parent ec407e8a06
commit 54bfb3efff
1 changed files with 3 additions and 2 deletions

View File

@ -1665,7 +1665,7 @@ class vmmCreate(vmmGObjectUI):
fs = None
template = None
if self._os is None:
if not self._is_container_install() and self._os is None:
return self.err.val_err(_("Please specify a valid OS variant."))
if instmethod == INSTALL_PAGE_ISO:
@ -1764,7 +1764,8 @@ class vmmCreate(vmmGObjectUI):
try:
# Overwrite the guest
installer = instclass(self.conn.get_backend())
self._guest = self._build_guest(self._os.name)
variant = self._os and self._os.name or None
self._guest = self._build_guest(variant)
if not self._guest:
return False
self._guest.installer = installer