summaryrefslogtreecommitdiff
path: root/virtinst/guest.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2019-06-13 20:26:26 -0400
committerCole Robinson <crobinso@redhat.com>2019-06-13 20:26:26 -0400
commit21723706f54ea4076da9cd7aa886292097820c5d (patch)
treea8853c79c8d813b46fa790661d64e0e5fb8e0101 /virtinst/guest.py
parent839eea35873dc9095df1548205867a1ecebd2408 (diff)
downloadvirt-manager-21723706f54ea4076da9cd7aa886292097820c5d.tar.gz
virt-install: Add --install OSNAME
Replace the unreleased --os-variant OSNAME,install=location with just --install OSNAME Unwind the --unattended dependency on upfront --os-variant while we are at it, since they are all intertwined. Now we can just do: virt-install --install OSNAME and virt-install --install OSNAME --unattended
Diffstat (limited to 'virtinst/guest.py')
-rw-r--r--virtinst/guest.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 5ad2b61d..7c8ed001 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -458,11 +458,7 @@ class Guest(XMLBuilder):
self._metadata.libosinfo.os_id = obj.full_id
def set_os_name(self, name):
- obj = OSDB.lookup_os(name)
- if obj is None:
- raise ValueError(_("Unknown OS name '%s'. "
- "See `osinfo-query os` for valid values.") % name)
-
+ obj = OSDB.lookup_os(name, raise_error=True)
logging.debug("Setting Guest osinfo name %s", obj)
self._set_os_obj(obj)