mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-04 12:21:57 +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
@ -12,8 +12,4 @@
|
||||
if ret is None:
|
||||
raise libvirtError("virDomainSnapshotListAllChildren() failed")
|
||||
|
||||
retlist = list()
|
||||
for snapptr in ret:
|
||||
retlist.append(virDomainSnapshot(self.domain(), _obj=snapptr))
|
||||
|
||||
return retlist
|
||||
return [virDomainSnapshot(self.domain(), _obj=snapptr) for snapptr in ret]
|
||||
|
Reference in New Issue
Block a user