On Fri, Jul 24, 2026 at 11:54:20PM +0200, Krzysztoff wrote:
More importantly - this change in the argument type makes absolutely no sense, since now the function lookupByUUID requires exactly the same argument as lookupByUUIDString - I suppose these functions were supposed to do different things but now they work exactly the same.
def lookupByUUID(self, uuid: "str") -> "virDomain":
Yes, this type annotation is wrong - it should be bytes, not string. The underlying code impl has not changed, and still wants bytes. This is just the recently added type annotation that is broken.
"""Try to lookup a domain on the given hypervisor based on its UUID. """ ret = libvirtmod.virDomainLookupByUUID(self._o, uuid) if ret is None: raise libvirtError('virDomainLookupByUUID() failed') __tmp = virDomain(self, _obj=ret) return __tmp
def lookupByUUIDString(self, uuidstr: "str") -> "virDomain": """Try to lookup a domain on the given hypervisor based on its UUID virDomainFree should be used to free the resources after the domain object is no longer needed. """ ret = libvirtmod.virDomainLookupByUUIDString(self._o, uuidstr) if ret is None: raise libvirtError('virDomainLookupByUUIDString() failed') __tmp = virDomain(self, _obj=ret) return __tmp
Best regards, Krzysztoff
With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|