1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

update credstash lookup plugin to use Python 2.4-compatible exception catching

This commit is contained in:
Scott Cunningham 2015-08-04 18:29:37 -07:00
parent 92327ba11f
commit 934ce86d35

View file

@ -45,7 +45,7 @@ class LookupModule(LookupBase):
val = credstash.getSecret(term, **kwargs)
except credstash.ItemNotFound:
raise AnsibleError('Key {} not found'.format(term))
except Exception as e:
except Exception, e:
raise AnsibleError('Encountered exception while fetching {}: {}'.format(term, e.message))
ret.append(val)