From b4f265b2d71c97b44cd6103783054c277ec64aa7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 17 Feb 2015 13:13:20 -0500 Subject: [PATCH] Fix exceptions on sdr read The string formatting is corrected for some 'bmc' errors. It has been suggested to restructure things to not complain, but so far when investigated, the systems actually had a defect in putting the wrong sensor number in. As a diagnostic aid, this seems to be useful. If a legitimate application of duplicate SDR record for sensor is pointed out, then we can restructure. Change-Id: I58c2ffc1108cbb157f1398b420ea3a24bc4f05e8 --- pyghmi/ipmi/sdr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/sdr.py b/pyghmi/ipmi/sdr.py index de03ae7a..ac05f03d 100644 --- a/pyghmi/ipmi/sdr.py +++ b/pyghmi/ipmi/sdr.py @@ -677,12 +677,12 @@ class SDR(object): if newent.sdrtype == TYPE_SENSOR: id = newent.sensor_number if id in self.sensors: - raise exc.BmcErrorException("Duplicate sensor number " + id) + raise exc.BmcErrorException("Duplicate sensor number %d" % id) self.sensors[id] = newent elif newent.sdrtype == TYPE_FRU: id = newent.fru_number if id in self.fru: - raise exc.BmcErrorException("Duplicate FRU identifier " + id) + raise exc.BmcErrorException("Duplicate FRU identifier %d" % id) self.fru[id] = newent def decode_aux(self, auxdata):