From 2e04969f178a67ecbe2de8146b5ed42ee878c705 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 1 Mar 2018 10:36:18 -0500 Subject: [PATCH] properly detect the absence of credential_type in older tower-cli (#36908) --- .../web_infrastructure/ansible_tower/tower_credential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py index ded57cc19c..b0d1c0d7d3 100644 --- a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py +++ b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py @@ -260,7 +260,7 @@ def main(): try: tower_cli.get_resource('credential_type') - except (AttributeError): + except (ImportError, AttributeError): # /api/v1/ backwards compat # older versions of tower-cli don't *have* a credential_type # resource