summaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2015-11-13 10:23:10 -0500
committerSamuel Munilla <smunilla@redhat.com>2015-11-20 13:39:22 -0500
commitc32d7eb88d30cbb131a9b8562d51e7a5930b79f4 (patch)
tree723309d83672293c4f20a701fe7d3886f95a2e1b /utils/src
parentca2e6af84b5d3f5239302348011b053c596a6ac6 (diff)
downloadopenshift-c32d7eb88d30cbb131a9b8562d51e7a5930b79f4.tar.gz
openshift-c32d7eb88d30cbb131a9b8562d51e7a5930b79f4.tar.bz2
openshift-c32d7eb88d30cbb131a9b8562d51e7a5930b79f4.tar.xz
openshift-c32d7eb88d30cbb131a9b8562d51e7a5930b79f4.zip
atomic-openshift-installer: connect_to error handling
Catch the exception that happens when connect_to isn't specified in installer.cfg.yaml
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/ooinstall/cli_installer.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index a1632ed0c..d38c0fd09 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -8,6 +8,7 @@ import re
import sys
from ooinstall import openshift_ansible
from ooinstall import OOConfig
+from ooinstall.oo_config import OOConfigInvalidHostError
from ooinstall.oo_config import Host
from ooinstall.variants import find_variant, get_variant_version_combos
@@ -447,7 +448,11 @@ def cli(ctx, unattended, configuration, ansible_playbook_directory, ansible_conf
ctx.obj['ansible_log_path'] = ansible_log_path
ctx.obj['verbose'] = verbose
- oo_cfg = OOConfig(ctx.obj['configuration'])
+ try:
+ oo_cfg = OOConfig(ctx.obj['configuration'])
+ except OOConfigInvalidHostError as e:
+ click.echo(e)
+ sys.exit(1)
# If no playbook dir on the CLI, check the config:
if not ansible_playbook_directory: