mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
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:
@@ -154,7 +154,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ from ansible.module_utils.six.moves import cStringIO as StringIO
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ from ansible.module_utils.ansible_tower import TowerModule, tower_auth_config, t
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import tower_cli
|
import tower_cli
|
||||||
import tower_cli.utils.exceptions as exc
|
import tower_cli.exceptions as exc
|
||||||
|
|
||||||
from tower_cli.conf import settings
|
from tower_cli.conf import settings
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user