mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix exception handling in credtash lookup (#51099)
Exception does not have property message and ansible returns completely different exception because of this
This commit is contained in:
parent
4df55bea2f
commit
20ed819acd
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ class LookupModule(LookupBase):
|
|||
except credstash.ItemNotFound:
|
||||
raise AnsibleError('Key {0} not found'.format(term))
|
||||
except Exception as e:
|
||||
raise AnsibleError('Encountered exception while fetching {0}: {1}'.format(term, e.message))
|
||||
raise AnsibleError('Encountered exception while fetching {0}: {1}'.format(term, e))
|
||||
ret.append(val)
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Reference in a new issue