summaryrefslogtreecommitdiffstats
path: root/cns-libs
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-03-13 17:02:13 +0530
committervponomar <vponomar@redhat.com>2019-03-13 12:42:59 +0000
commit233af471f0ab027bdd9df1844111dd560f334d75 (patch)
tree18136f2730a14ae1a317e63c01dfb0ea89a7074e /cns-libs
parent30f29a692617cb7a0f70de96fff6617c8fbc2993 (diff)
Make 'enable_pvc_resize' func raise error only on non-zero return code
As of now, it raises exception when our command doesn't fail, but has empty output. It is bug. So, fix it by checking only return code being non-zero. Change-Id: I6c029e17220d6ae7eb184348d84c189ba03274c8
Diffstat (limited to 'cns-libs')
-rw-r--r--cns-libs/cnslibs/common/cns_libs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cns-libs/cnslibs/common/cns_libs.py b/cns-libs/cnslibs/common/cns_libs.py
index 3c7bdc91..f7fc92f9 100644
--- a/cns-libs/cnslibs/common/cns_libs.py
+++ b/cns-libs/cnslibs/common/cns_libs.py
@@ -126,7 +126,7 @@ def enable_pvc_resize(master_node):
cmd = ("/usr/local/bin/master-restart api && "
"/usr/local/bin/master-restart controllers")
ret, out, err = g.run(master_node, cmd, "root")
- if ret != 0 or out == "":
+ if ret != 0:
err_msg = "Failed to execute cmd %s on %s\nout: %s\nerr: %s" % (
cmd, master_node, out, err)
g.log.error(err_msg)