python: fix fd leak in generator.py
[libvirt-python/ericb.git] / libvirt-override-virStoragePool.py
blobffe160cdcdd82ee34f882f5b4a0062369e7c74c5
1 def listAllVolumes(self, flags):
2 """List all storage volumes and returns a list of storage volume objects"""
3 ret = libvirtmod.virStoragePoolListAllVolumes(self._o, flags)
4 if ret is None:
5 raise libvirtError("virStoragePoolListAllVolumes() failed", conn=self)
7 retlist = list()
8 for volptr in ret:
9 retlist.append(virStorageVol(self, _obj=volptr))
11 return retlist