python: fix fd leak in generator.py
[libvirt-python/ericb.git] / libvirt-override-virDomainSnapshot.py
blobbf708a52bd6b85b16846fbf004ee57edee2e871d
1 def getConnect(self):
2 """Get the connection that owns the domain that a snapshot was created for"""
3 return self.connect()
5 def getDomain(self):
6 """Get the domain that a snapshot was created for"""
7 return self.domain()
9 def listAllChildren(self, flags):
10 """List all child snapshots and returns a list of snapshot objects"""
11 ret = libvirtmod.virDomainSnapshotListAllChildren(self._o, flags)
12 if ret is None:
13 raise libvirtError("virDomainSnapshotListAllChildren() failed", conn=self)
15 retlist = list()
16 for snapptr in ret:
17 retlist.append(virDomainSnapshot(self, _obj=snapptr))
19 return retlist