Fix ROC temp KeyError
This commit is contained in:
parent
b1883f4fbf
commit
e02c99a19b
|
@ -62,7 +62,7 @@ def main(args):
|
||||||
'errors_correctable': int(resp['Status']['Memory Correctable Errors']),
|
'errors_correctable': int(resp['Status']['Memory Correctable Errors']),
|
||||||
'errors_uncorrectable': int(resp['Status']['Memory Uncorrectable Errors']),
|
'errors_uncorrectable': int(resp['Status']['Memory Uncorrectable Errors']),
|
||||||
'bbu': int(resp['HwCfg']['BBU'] != 'Absent'),
|
'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']:
|
for vd in resp['VD LIST']:
|
||||||
|
|
Loading…
Reference in New Issue