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 ded57cc19cd..b0d1c0d7d32 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