From 51dd7e556b3dafab88b571b370ecbfc99bcd0ae0 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 24 Feb 2017 11:50:33 -0500 Subject: Adding get_env_var to deploymentconfig. --- roles/lib_openshift/src/class/oc_adm_registry.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'roles/lib_openshift/src/class') diff --git a/roles/lib_openshift/src/class/oc_adm_registry.py b/roles/lib_openshift/src/class/oc_adm_registry.py index 069d58d9b..35b417059 100644 --- a/roles/lib_openshift/src/class/oc_adm_registry.py +++ b/roles/lib_openshift/src/class/oc_adm_registry.py @@ -235,9 +235,10 @@ class Registry(OpenShiftCLI): # The environment variable for REGISTRY_HTTP_SECRET is autogenerated # We should set the generated deploymentconfig to the in memory version # the following modifications will overwrite if needed - result = self.deploymentconfig.get_env_var('REGISTRY_HTTP_SECRET') - if result: - deploymentconfig.update_env_var('REGISTRY_HTTP_SECRET', result['value']) + if self.deploymentconfig: + result = self.deploymentconfig.get_env_var('REGISTRY_HTTP_SECRET') + if result: + deploymentconfig.update_env_var('REGISTRY_HTTP_SECRET', result['value']) # Currently we know that our deployment of a registry requires a few extra modifications # Modification 1 -- cgit v1.2.3