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

pull/11778/head
Scott Cunningham 9 years ago
parent 92327ba11f
commit 934ce86d35

@ -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)

Loading…
Cancel
Save