Commit 87ef53c9 by Scott Cunningham

credstash lookup plugin: python 2.6-compatible string.format()

parent c4629b72
...@@ -43,9 +43,9 @@ class LookupModule(LookupBase): ...@@ -43,9 +43,9 @@ class LookupModule(LookupBase):
try: try:
val = credstash.getSecret(term, **kwargs) val = credstash.getSecret(term, **kwargs)
except credstash.ItemNotFound: except credstash.ItemNotFound:
raise AnsibleError('Key {} not found'.format(term)) raise AnsibleError('Key {0} not found'.format(term))
except Exception, e: except Exception, e:
raise AnsibleError('Encountered exception while fetching {}: {}'.format(term, e.message)) raise AnsibleError('Encountered exception while fetching {0}: {1}'.format(term, e.message))
ret.append(val) ret.append(val)
return ret return ret
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment