diff options
author | Philipp Hahn <hahn@univention.de> | 2020-04-20 18:28:36 +0200 |
---|---|---|
committer | Philipp Hahn <hahn@univention.de> | 2020-07-27 13:24:36 +0200 |
commit | a65d230ded7d553ac4465ba4e64b82745dec69c2 (patch) | |
tree | b69927f517d5548434a0c6eb3dcbc6a8a7883ec6 /libvirt-override-virDomainCheckpoint.py | |
parent | d2de75dd838801ef47c834f91c9f8ef5ed892d29 (diff) | |
download | libvirt-python-a65d230ded7d553ac4465ba4e64b82745dec69c2.tar.gz |
generator: Fix domainSnapshot.listAllChildren()
virDomainSnapshot(dom, _obj)
expects a reference to the virDomain as its first argument, but
virDomainSnapshot.listAllChildren()
passes `self` instead:
libvirt.py:6459: error: Argument 1 to "virDomainSnapshot" has incompatible type "virDomainSnapshot"; expected "virDomain"
>>> import libvirt
>>> con = libvirt.open('test:///default')
>>> dom = con.lookupByName("test")
>>> first = dom.snapshotCreateXML("""<domainsnapshot><name>First</name></domainsnapshot>""")
>>> second = dom.snapshotCreateXML("""<domainsnapshot><name>Second</name></domainsnapshot>""")
>>> child, = first.listAllChildren()
>>> second.domain()
<libvirt.virDomain object at 0x7fb32be3cfd0>
^^^^^^^^^
>>> child.domain()
<libvirt.virDomainSnapshot object at 0x7fb32bdb9080>
^^^^^^^^^^^^^^^^^
Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'libvirt-override-virDomainCheckpoint.py')
0 files changed, 0 insertions, 0 deletions