mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-12-04 20:23:46 +03:00
override: Convert to list comprehension
:%s/retlist = list()\n\s*\(for \w\+ in ret\):\n\s*retlist.append(\(.*\))\n\n\s*return retlist/return [\2 \1]/ Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
committed by
Daniel Berrange
parent
d49e850807
commit
5777008197
@@ -4,8 +4,4 @@
|
||||
if ret is None:
|
||||
raise libvirtError("virStoragePoolListAllVolumes() failed")
|
||||
|
||||
retlist = list()
|
||||
for volptr in ret:
|
||||
retlist.append(virStorageVol(self._conn, _obj=volptr))
|
||||
|
||||
return retlist
|
||||
return [virStorageVol(self._conn, _obj=volptr) for volptr in ret]
|
||||
|
||||
Reference in New Issue
Block a user