File 005-xmlbase-fix-parentnode-None-check.patch of Package virt-manager
Subject: xmlbase: fix parentnode None check
From: Cole Robinson crobinso@redhat.com Tue Sep 23 09:01:47 2025 -0400
Date: Wed Oct 1 11:22:35 2025 -0400:
Git: ff9fa95e52f890ccd8dce18567aa7cc30582ca4f
Future XMLAPI implementation need this.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtinst/xmlbase.py b/virtinst/xmlbase.py
index 098e75f5a..8cff450bd 100644
--- a/virtinst/xmlbase.py
+++ b/virtinst/xmlbase.py
@@ -243,7 +243,7 @@ class XMLBase:
xpathobj = XPath(fullxpath)
parentxpath = "."
parentnode = self._find(parentxpath)
- if not parentnode:
+ if parentnode is None:
raise xmlutil.DevError("Did not find XML root node for xpath=%s" % fullxpath)
for xpathseg in xpathobj.segments[1:]: