mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 18:50:21 -07:00
Cleanup more pyflakes warnings (2 real problems)
This commit is contained in:
parent
1fa975d81a
commit
7aa9f6754a
7 changed files with 13 additions and 22 deletions
|
@ -31,7 +31,7 @@ __metaclass__ = type
|
|||
|
||||
import os
|
||||
|
||||
from ansible.errors import *
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.lookup import LookupBase
|
||||
|
||||
|
||||
|
@ -59,16 +59,13 @@ class HashiVault:
|
|||
raise AnsibleError("Invalid Hashicorp Vault Token Specified")
|
||||
|
||||
def get(self):
|
||||
value = ""
|
||||
|
||||
data = self.client.read(self.secret)
|
||||
if data == None:
|
||||
if data is None:
|
||||
raise AnsibleError("The secret %s doesn't seem to exist" % self.secret)
|
||||
else:
|
||||
return data['data']['value']
|
||||
|
||||
|
||||
|
||||
class LookupModule(LookupBase):
|
||||
|
||||
def run(self, terms, variables, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue