Subject: hostdev: Fix error when mdev type_id is missing From: Cole Robinson crobinso@redhat.com Sat Apr 6 15:54:09 2024 -0400 Date: Sat Apr 6 15:54:09 2024 -0400: Git: dce9de481fde5919dca6f75074223af32b48bac1 Signed-off-by: Cole Robinson diff --git a/virtinst/devices/hostdev.py b/virtinst/devices/hostdev.py index cc10e5bf..41f06327 100644 --- a/virtinst/devices/hostdev.py +++ b/virtinst/devices/hostdev.py @@ -70,8 +70,8 @@ class DeviceHostdev(Device): self.model = "vfio-ap" self.managed = "no" - elif (re.match("^nvidia-[0-9]{2}", nodedev.type_id) or - re.match("^i915-GVTg_V[0-9]_[0-9]", nodedev.type_id)): + elif (re.match("^nvidia-[0-9]{2}", nodedev.type_id or "") or + re.match("^i915-GVTg_V[0-9]_[0-9]", nodedev.type_id or "")): self.model = "vfio-pci" self.managed = "yes" self.display = "off"