Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 7aa8dc5

Browse files
committed
Throw useful error if users capabilities xml has no domains.
1 parent b45f1b8 commit 7aa8dc5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

virtinst/CapabilitiesParser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ def parseXML(self, node):
164164

165165

166166
def bestDomainType(self, accelerated=None):
167+
if len(self.domains) == 0:
168+
raise CapabilitiesParserException(_("No domains available for this guest."))
167169
if accelerated is None:
168170
# Picking last in list so we favour KVM/KQEMU over QEMU
169171
return self.domains[-1]

0 commit comments

Comments
 (0)