summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src
diff options
context:
space:
mode:
authorEric Wolinetz <ewolinet@redhat.com>2017-03-15 13:29:55 -0500
committerGitHub <noreply@github.com>2017-03-15 13:29:55 -0500
commit52726611f182c6db390d7a964f0bf24fed297761 (patch)
treebd8ce1f37b22ab4cfb6bdde5a62deb90245b09c3 /roles/lib_openshift/src
parent6962f09c1dbb4e963b32667d7106a3c547a35a0f (diff)
parent91ca8e8134bc0af84478125174c58f0fb2b8943c (diff)
downloadopenshift-52726611f182c6db390d7a964f0bf24fed297761.tar.gz
openshift-52726611f182c6db390d7a964f0bf24fed297761.tar.bz2
openshift-52726611f182c6db390d7a964f0bf24fed297761.tar.xz
openshift-52726611f182c6db390d7a964f0bf24fed297761.zip
Merge branch 'master' into logging_cherrypick_3657
Diffstat (limited to 'roles/lib_openshift/src')
-rw-r--r--roles/lib_openshift/src/class/oc_adm_registry.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/lib_openshift/src/class/oc_adm_registry.py b/roles/lib_openshift/src/class/oc_adm_registry.py
index c083cd179..25519c9c9 100644
--- a/roles/lib_openshift/src/class/oc_adm_registry.py
+++ b/roles/lib_openshift/src/class/oc_adm_registry.py
@@ -87,8 +87,8 @@ class Registry(OpenShiftCLI):
''' prepared_registry property '''
if not self.__prepared_registry:
results = self.prepare_registry()
- if not results:
- raise RegistryException('Could not perform registry preparation.')
+ if not results or ('returncode' in results and results['returncode'] != 0):
+ raise RegistryException('Could not perform registry preparation. {}'.format(results))
self.__prepared_registry = results
return self.__prepared_registry
@@ -153,8 +153,8 @@ class Registry(OpenShiftCLI):
# probably need to parse this
# pylint thinks results is a string
# pylint: disable=no-member
- if results['returncode'] != 0 and 'items' in results['results']:
- return results
+ if results['returncode'] != 0 and 'items' not in results['results']:
+ raise RegistryException('Could not perform registry preparation. {}'.format(results))
service = None
deploymentconfig = None