summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-20 14:36:13 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-20 14:36:13 -0500
commitf0d13819c35727300101a7e31b8ff9b0022e683f (patch)
treeda964721c03327adaa327a69306de95010e349bb /utils/src/ooinstall
parent191bfbaa614b1eeafe4785edd295e1e0b3498175 (diff)
parenta72243eda9ad0fb066c405a8171d41bfd8a16ecf (diff)
downloadopenshift-f0d13819c35727300101a7e31b8ff9b0022e683f.tar.gz
openshift-f0d13819c35727300101a7e31b8ff9b0022e683f.tar.bz2
openshift-f0d13819c35727300101a7e31b8ff9b0022e683f.tar.xz
openshift-f0d13819c35727300101a7e31b8ff9b0022e683f.zip
Merge pull request #890 from smunilla/friendly_unattended_errors
atomic-openshift-installer: connect_to error handling
Diffstat (limited to 'utils/src/ooinstall')
-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 94f7afdc9..0b3af8829 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
@@ -449,7 +450,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: