mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Fixing exception import for tower modules (#50447)
* fixing the exception import from tower modules * Adding tests for checking tower modules are failing with correct msg * fixed failing tests * fixed failing test in tower_team
This commit is contained in:
parent
d84e21dfc8
commit
cd27982959
27 changed files with 168 additions and 19 deletions
|
@ -154,7 +154,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -97,7 +97,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -70,7 +70,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -71,7 +71,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -59,7 +59,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -87,7 +87,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -82,7 +82,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -197,7 +197,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -88,7 +88,7 @@ from ansible.module_utils.six.moves import cStringIO as StringIO
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -53,7 +53,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -52,7 +52,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -88,7 +88,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -75,7 +75,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -58,7 +58,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -54,7 +54,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
|
@ -75,7 +75,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||
|
||||
try:
|
||||
import tower_cli
|
||||
import tower_cli.utils.exceptions as exc
|
||||
import tower_cli.exceptions as exc
|
||||
|
||||
from tower_cli.conf import settings
|
||||
except ImportError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue