raise AnsibleError in hashi_vault lookup plugin when hvac module is not installed (#16859)

(cherry picked from commit 14901b65d9)
This commit is contained in:
victoru 2016-08-04 12:06:12 -05:00 committed by nitzmahone
parent df16e37ad7
commit 08ae111757

View file

@ -45,7 +45,7 @@ class HashiVault:
try:
import hvac
except ImportError:
AnsibleError("Please pip install hvac to use this module")
raise AnsibleError("Please pip install hvac to use this module")
self.url = kwargs.pop('url')
self.secret = kwargs.pop('secret')