From e1021fc1bb28e9357f5f137532dec0ffd4522435 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 24 Aug 2016 08:06:31 -0700 Subject: Move nested print_read_config_error function into it's own function --- utils/src/ooinstall/__init__.py | 4 ---- utils/src/ooinstall/cli_installer.py | 2 +- utils/src/ooinstall/oo_config.py | 5 +++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/utils/src/ooinstall/__init__.py b/utils/src/ooinstall/__init__.py index 944dea3b5..96e495e19 100644 --- a/utils/src/ooinstall/__init__.py +++ b/utils/src/ooinstall/__init__.py @@ -1,5 +1 @@ -# TODO: Temporarily disabled due to importing old code into openshift-ansible -# repo. We will work on these over time. # pylint: disable=missing-docstring - -from .oo_config import OOConfig diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index a8595177c..230891e7f 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -8,7 +8,7 @@ import sys from distutils.version import LooseVersion import click from ooinstall import openshift_ansible -from ooinstall import OOConfig +from ooinstall.oo_config import OOConfig from ooinstall.oo_config import OOConfigInvalidHostError from ooinstall.oo_config import Host, Role from ooinstall.variants import find_variant, get_variant_version_combos diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py index 0cd5fdabf..9ef07bb82 100644 --- a/utils/src/ooinstall/oo_config.py +++ b/utils/src/ooinstall/oo_config.py @@ -29,13 +29,14 @@ DEFAULT_REQUIRED_FACTS = ['ip', 'public_ip', 'hostname', 'public_hostname'] PRECONFIGURED_REQUIRED_FACTS = ['hostname', 'public_hostname'] def print_read_config_error(error, path='the configuration file'): - message = """ + message = """ Error loading config. {}. See https://docs.openshift.com/enterprise/latest/install_config/install/quick_install.html#defining-an-installation-configuration-file for information on creating a configuration file or delete {} and re-run the installer. """ - print message.format(error, path) + print message.format(error, path) + class OOConfigFileError(Exception): """The provided config file path can't be read/written -- cgit v1.2.3