Fix ROC temp KeyError

This commit is contained in:
David Hain 2018-06-21 13:45:24 -04:00
parent b1883f4fbf
commit e02c99a19b
1 changed files with 1 additions and 1 deletions

View File

@ -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']: