mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-29 19:41:52 +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("virDomainCheckpointListAllChildren() failed")
|
||||
|
||||
retlist = list()
|
||||
for chkptr in ret:
|
||||
retlist.append(virDomainCheckpoint(self.domain(), _obj=chkptr))
|
||||
|
||||
return retlist
|
||||
return [virDomainCheckpoint(self.domain(), _obj=chkptr) for chkptr in ret]
|
||||
|
Reference in New Issue
Block a user