summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Bielawa <tbielawa@redhat.com>2016-08-25 07:53:24 -0700
committerTim Bielawa <tbielawa@redhat.com>2016-08-25 07:53:24 -0700
commitf8b5776ff57500dc03a6b82ca70191be5e7a5b17 (patch)
treed27d035d173e76ba031387065c4543373a3bb9b3
parent71d131a28662f37766f699ddb6c27ee2125ca5cb (diff)
downloadopenshift-f8b5776ff57500dc03a6b82ca70191be5e7a5b17.tar.gz
openshift-f8b5776ff57500dc03a6b82ca70191be5e7a5b17.tar.bz2
openshift-f8b5776ff57500dc03a6b82ca70191be5e7a5b17.tar.xz
openshift-f8b5776ff57500dc03a6b82ca70191be5e7a5b17.zip
Fix PEP8 in oo_config.py
-rw-r--r--utils/src/ooinstall/oo_config.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py
index 0e855f437..b9f0cc65c 100644
--- a/utils/src/ooinstall/oo_config.py
+++ b/utils/src/ooinstall/oo_config.py
@@ -18,7 +18,7 @@ CONFIG_PERSIST_SETTINGS = [
'version',
'variant',
'variant_version',
- ]
+]
DEPLOYMENT_VARIABLES_BLACKLIST = [
'hosts',
@@ -28,6 +28,7 @@ DEPLOYMENT_VARIABLES_BLACKLIST = [
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 = """
Error loading config. {}.
@@ -103,7 +104,6 @@ class Host(object):
def is_storage(self):
return 'storage' in self.roles
-
def is_etcd_member(self, all_hosts):
""" Will this host be a member of a standalone etcd cluster. """
if not self.is_master():
@@ -189,7 +189,7 @@ class OOConfig(object):
with open(self.config_path, 'r') as cfgfile:
loaded_config = yaml.safe_load(cfgfile.read())
- if not 'version' in loaded_config:
+ if 'version' not in loaded_config:
print_read_config_error('Legacy configuration file found', self.config_path)
sys.exit(0)
@@ -242,7 +242,6 @@ class OOConfig(object):
for name, variables in role_list.iteritems():
self.deployment.roles.update({name: Role(name, variables)})
-
except IOError, ferr:
raise OOConfigFileError('Cannot open config file "{}": {}'.format(ferr.filename,
ferr.strerror))
@@ -251,7 +250,6 @@ class OOConfig(object):
'Config file "{}" is not a valid YAML document'.format(self.config_path))
installer_log.debug("Parsed the config file")
-
def _upgrade_v1_config(self, config):
new_config_data = {}
new_config_data['deployment'] = {}
@@ -396,7 +394,6 @@ class OOConfig(object):
print "Error persisting settings: {}".format(e)
sys.exit(0)
-
return p_settings
def yaml(self):