From e02c99a19b85aa199371a42a0fd6d0226151819a Mon Sep 17 00:00:00 2001 From: David Hain Date: Thu, 21 Jun 2018 13:45:24 -0400 Subject: [PATCH] Fix ROC temp KeyError --- storcli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storcli.py b/storcli.py index 4f4ade1..153c1d7 100644 --- a/storcli.py +++ b/storcli.py @@ -62,7 +62,7 @@ def main(args): 'errors_correctable': int(resp['Status']['Memory Correctable Errors']), 'errors_uncorrectable': int(resp['Status']['Memory Uncorrectable Errors']), 'bbu': int(resp['HwCfg']['BBU'] != 'Absent'), - 'roc_temp': int(resp['HwCfg']['ROC temperature(Degree Celsius)']), + 'roc_temp': int(resp['HwCfg'].get('ROC temperature(Degree Celsius)', 0)), }) for vd in resp['VD LIST']: