summaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2016-03-04 08:39:55 -0500
committerSamuel Munilla <smunilla@redhat.com>2016-03-04 08:40:36 -0500
commitb9aef73b3d9444c99fa13fff3317751c7ec1495a (patch)
treec7add5a674e240cb6c117056ad7c6b4bd05fd6b2 /utils/src
parent60459f95e75e0a65886b755e85471cc2d8a8f73b (diff)
downloadopenshift-b9aef73b3d9444c99fa13fff3317751c7ec1495a.tar.gz
openshift-b9aef73b3d9444c99fa13fff3317751c7ec1495a.tar.bz2
openshift-b9aef73b3d9444c99fa13fff3317751c7ec1495a.tar.xz
openshift-b9aef73b3d9444c99fa13fff3317751c7ec1495a.zip
a-o-i: Error out early if callback_facts is None
Bail out much earlier if for some reason callback_facts does not return any data. This should prevent later methods from generating stack traces.
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/ooinstall/cli_installer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index ace834323..a4262488c 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -618,7 +618,7 @@ def get_hosts_to_run_on(oo_cfg, callback_facts, unattended, force, verbose):
openshift_ansible.set_config(oo_cfg)
click.echo('Gathering information from hosts...')
callback_facts, error = openshift_ansible.default_facts(oo_cfg.hosts, verbose)
- if error:
+ if error or callback_facts is None:
click.echo("There was a problem fetching the required information. See " \
"{} for details.".format(oo_cfg.settings['ansible_log_path']))
sys.exit(1)
@@ -805,7 +805,7 @@ def install(ctx, force):
click.echo('Gathering information from hosts...')
callback_facts, error = openshift_ansible.default_facts(oo_cfg.hosts,
verbose)
- if error:
+ if error or callback_facts is None:
click.echo("There was a problem fetching the required information. " \
"Please see {} for details.".format(oo_cfg.settings['ansible_log_path']))
sys.exit(1)