From 8a95bb14d811f0e7fbb9f6504d1b66f78adfd877 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 27 Jan 2017 09:25:57 -0500 Subject: Adding fix for when the resource does not exist. Added test cases. --- roles/lib_openshift/library/oc_scale.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roles/lib_openshift/library') diff --git a/roles/lib_openshift/library/oc_scale.py b/roles/lib_openshift/library/oc_scale.py index 6ae85e220..1259c5711 100644 --- a/roles/lib_openshift/library/oc_scale.py +++ b/roles/lib_openshift/library/oc_scale.py @@ -1644,6 +1644,8 @@ class OCScale(OpenShiftCLI): state = params['state'] api_rval = oc_scale.get() + if api_rval['returncode'] != 0: + return {'failed': True, 'msg': api_rval} ##### # Get -- cgit v1.2.3