mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
module utils: update code to python3 (#10907)
* module utils: update code to python3 * add changelog frag
This commit is contained in:
@@ -183,7 +183,7 @@ class UTM:
|
||||
result = None
|
||||
if response is not None:
|
||||
results = json.loads(response.read())
|
||||
result = next(iter(filter(lambda d: d['name'] == module.params.get('name'), results)), None)
|
||||
result = next(iter([d for d in results if d['name'] == module.params.get('name')]), None)
|
||||
return info, result
|
||||
|
||||
def _clean_result(self, result):
|
||||
|
||||
Reference in New Issue
Block a user