Hide Forgot
Description of problem: It looks like there is some conflicting docs in pythons domain lookup documentation: http://libvirt.org/docs/libvirt-appdev-guide-python/en-US/html/libvirt_application_development_guide_using_python-Guest_Domains.html vs https://libvirt.org/python.html Specifically, this part: dom = conn.lookupByName(domainName) if dom == None: print('Failed to get the domain object', file=sys.stderr) vs try: dom0 = conn.lookupByName("Domain-0") except: print 'Failed to find the main domain' On the version of python-libvirt that I'm using (1.2.2 on ubuntu 14.04) when conn.lookupByName cannot find the domain name, it raises a libvirt.libvirtError, with err.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN. This is also the case for lookupById() and lookupByUuid(). Assuming this wasn't behavior that was recently changed, the appdev docs should be updated to reflect this.
Closing old bug since the appdev guide is no longer maintained.