Fix Python 2.7 compat (#58816)

pull/61735/head
Evgeniy Krysanov 5 years ago committed by John R Barker
parent 5f9fe6b9c8
commit 9797857a67

@ -166,7 +166,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(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:
return res

Loading…
Cancel
Save