mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 18:21:03 -03:30
cli: show a better error if AWX is migrating
see: https://github.com/ansible/awx/issues/4721
This commit is contained in:
@@ -130,7 +130,14 @@ class CLI(object):
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
def fetch_version_root(self):
|
def fetch_version_root(self):
|
||||||
self.v2 = self.root.get().available_versions.v2.get()
|
try:
|
||||||
|
self.v2 = self.root.get().available_versions.v2.get()
|
||||||
|
except AttributeError:
|
||||||
|
raise RuntimeError(
|
||||||
|
'An error occurred while fetching {}/api/'.format(
|
||||||
|
self.get_config('host')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def parse_resource(self, skip_deprecated=False):
|
def parse_resource(self, skip_deprecated=False):
|
||||||
"""Attempt to parse the <resource> (e.g., jobs) specified on the CLI
|
"""Attempt to parse the <resource> (e.g., jobs) specified on the CLI
|
||||||
|
|||||||
Reference in New Issue
Block a user