mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
modules: update code to python3 (#10904)
* modules: update code to python3 * pamd: rollback changes * add changelog frag * fix/improve assignments using generators * Update plugins/modules/launchd.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -155,7 +155,7 @@ def get_existing_deploy_key(module, bitbucket):
|
||||
if info['status'] != 200:
|
||||
module.fail_json(msg='Failed to retrieve the list of deploy keys: {0}'.format(info))
|
||||
|
||||
res = next(iter(filter(lambda v: v['label'] == module.params['label'], content['values'])), None)
|
||||
res = next((v for v in content['values'] if v['label'] == module.params['label']), None)
|
||||
|
||||
if res is not None:
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user