Fix Python 2.7 compat (#58816)
This commit is contained in:
parent
5f9fe6b9c8
commit
9797857a67
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ def get_existing_deploy_key(module, bitbucket):
|
||||||
if info['status'] != 200:
|
if info['status'] != 200:
|
||||||
module.fail_json(msg='Failed to retrieve the list of deploy keys: {0}'.format(info))
|
module.fail_json(msg='Failed to retrieve the list of deploy keys: {0}'.format(info))
|
||||||
|
|
||||||
res = next(filter(lambda v: v['label'] == module.params['label'], content['values']), None)
|
res = next(iter(filter(lambda v: v['label'] == module.params['label'], content['values'])), None)
|
||||||
|
|
||||||
if res is not None:
|
if res is not None:
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Reference in a new issue