Merge pull request #8308 from rebeccahhh/awxkit_errormessage_correction

correct error message when calling tower_AWXKit collections module and venv doesn't have it

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-10-02 16:56:03 +00:00 committed by GitHub
commit 1792b1350c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ class TowerAWXKitModule(TowerModule):
# Die if we don't have AWX_KIT installed
if not HAS_AWX_KIT:
self.exit_json(msg=missing_required_lib('awxkit'))
self.fail_json(msg=missing_required_lib('awxkit'))
# Establish our conneciton object
self.connection = Connection(self.host, verify=self.verify_ssl)
@ -38,7 +38,7 @@ class TowerAWXKitModule(TowerModule):
self.connection.login(username=self.username, password=self.password)
self.authenticated = True
except Exception:
self.exit_json("Failed to authenticate")
self.fail_json("Failed to authenticate")
def get_api_v2_object(self):
if not self.apiV2Ref: