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)