From 238d5e22f80686cf86a93e292f5bd88135fdfe6e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 30 Apr 2014 11:06:20 -0400 Subject: [PATCH] Correct check for _sdr in command In the attempt to clean up, one change broke how a command object knows whether it has an SDR yet or not. Correct that mistake. Change-Id: I76faaccf15c2dbfa2b7d5a3a4e1665e0cefe4c6d --- pyghmi/ipmi/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 9eb4834c..04a6b0c7 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -312,7 +312,7 @@ class Command(object): :returns: Iterator of sdr.SensorReading objects """ - if '_sdr' not in self.__dict__: + if self._sdr is None: self._sdr = sdr.SDR(self) for sensor in self._sdr.get_sensor_numbers(): rsp = self.raw_command(command=0x2d, netfn=4, data=(sensor,))