From 69d786c15133c0b5f6ae8daf5ebd1ad8d6da1d49 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 12 Jan 2017 07:26:37 -0500 Subject: [PATCH] Provide more consistent attributes When an reading is unavialable, a distinct set of attributes were available. Correct this by at least having the same attributes available. Change-Id: I9fc351d804f638a2535a2c9be9d9e9929f2be6ba --- pyghmi/ipmi/sdr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyghmi/ipmi/sdr.py b/pyghmi/ipmi/sdr.py index 5a501063..348e7409 100644 --- a/pyghmi/ipmi/sdr.py +++ b/pyghmi/ipmi/sdr.py @@ -193,6 +193,8 @@ class SensorReading(object): self.value = None self.imprecision = None self.states = [] + self.state_ids = [] + self.unavailable = 0 try: self.health = reading['health'] self.states = reading['states'] @@ -215,6 +217,7 @@ class SensorReading(object): 'imprecision': self.imprecision, 'name': self.name, 'type': self.type, + 'unavailable': self.unavailable, 'health': self.health })