summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cxmanage_api/node.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cxmanage_api/node.py b/cxmanage_api/node.py
index 0977bf1..834a900 100644
--- a/cxmanage_api/node.py
+++ b/cxmanage_api/node.py
@@ -1123,6 +1123,8 @@ communication.
:param ipmitool_args: Arguments to pass to the ipmitool.
:type ipmitool_args: list
+
+ :raises IpmiError: If the IPMI command fails.
"""
if ("IPMITOOL_PATH" in os.environ):
@@ -1140,6 +1142,8 @@ communication.
process = subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
+ if(process.returncode != 0):
+ raise IpmiError('IPMI command returned with non-zero exit code')
return (stdout + stderr).strip()
def get_ubootenv(self):