From 060455ecd15a8ee714cac32aab667e747df1074e Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 22 Feb 2017 11:52:43 -0500 Subject: Added required_together. Added two minor bug fixes for when data is not passed. --- roles/lib_openshift/library/oc_adm_registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/lib_openshift/library/oc_adm_registry.py') diff --git a/roles/lib_openshift/library/oc_adm_registry.py b/roles/lib_openshift/library/oc_adm_registry.py index 32a4f8637..5b5d823e6 100644 --- a/roles/lib_openshift/library/oc_adm_registry.py +++ b/roles/lib_openshift/library/oc_adm_registry.py @@ -2226,7 +2226,7 @@ class Registry(OpenShiftCLI): # probably need to parse this # pylint thinks results is a string # pylint: disable=no-member - if results['returncode'] != 0 and results['results'].has_key('items'): + if results['returncode'] != 0 and 'items' in results['results']: return results service = None @@ -2307,7 +2307,7 @@ class Registry(OpenShiftCLI): # Currently we know that our deployment of a registry requires a few extra modifications # Modification 1 # we need specific environment variables to be set - for key, value in self.config.config_options['env_vars']['value'].items(): + for key, value in self.config.config_options['env_vars'].get('value', {}).items(): if not deploymentconfig.exists_env_key(key): deploymentconfig.add_env_value(key, value) else: -- cgit v1.2.3