clean up error messages
diff --git a/bin/inventory_items.py b/bin/inventory_items.py
index 999b28b..52bca0a 100644
--- a/bin/inventory_items.py
+++ b/bin/inventory_items.py
@@ -50,7 +50,7 @@
'is_fru' : False,
'fru_type' : 0,
'state' : 0,
- 'data' : { 'manufacturer' : "" }
+ 'manufacturer' : "",
}
self.cache = True
@@ -63,7 +63,7 @@
## translate dbus data into basic data types
for k in data.keys():
d = Openbmc.DbusProperty(k,data[k])
- self.item['data'][str(k)] = d.getBaseValue()
+ self.item[str(k)] = d.getBaseValue()
self.saveToCache()
@dbus.service.method("org.openbmc.SensorValue",
@@ -73,7 +73,7 @@
print "Update Fru State: "+str(self.item['state'])
def setField(self,field,value):
- self.item['data'][field] = value
+ self.item[field] = value
def isCached(self):
return self.cache
@@ -91,7 +91,7 @@
try:
output = open(self.getCacheFilename(), 'wb')
## just pickle dict not whole object
- cPickle.dump(self.item['data'],output)
+ cPickle.dump(self.item,output)
except Exception as e:
print "ERROR: "+str(e)
finally:
@@ -108,7 +108,7 @@
p = open(filename, 'rb')
data2 = cPickle.load(p)
for k in data2.keys():
- self.item['data'][k] = data2[k]
+ self.item[k] = data2[k]
except Exception as e:
print "ERROR: " +str(e)
finally:
diff --git a/objects/power_control_obj.c b/objects/power_control_obj.c
index 7abff35..c9783ee 100644
--- a/objects/power_control_obj.c
+++ b/objects/power_control_obj.c
@@ -37,7 +37,7 @@
guint poll_int = control_get_poll_interval(control);
if (poll_int == 0)
{
- printf("ERROR: Poll interval cannot be 0\n");
+ printf("ERROR PowerControl: Poll interval cannot be 0\n");
return FALSE;
}
//handle timeout
@@ -45,7 +45,7 @@
if (difftime(current_time,pgood_timeout_start) > control_power_get_pgood_timeout(control_power)
&& pgood_timeout_start != 0)
{
- printf("ERROR: Pgood poll timeout\n");
+ printf("ERROR PowerControl: Pgood poll timeout\n");
// set timeout to 0 so timeout doesn't happen again
control_power_set_pgood_timeout(control_power,0);
pgood_timeout_start = 0;
@@ -74,7 +74,7 @@
}
}
} else {
- printf("ERROR: GPIO read error (rc=%d)\n",rc);
+ printf("ERROR PowerControl: GPIO read error (gpio=%s,rc=%d)\n",pgood.name,rc);
}
//pgood is not at desired state yet
if (gpio != control_power_get_state(control_power) &&
@@ -132,7 +132,7 @@
} while(0);
if (error != GPIO_OK)
{
- printf("ERROR: GPIO set power state (rc=%d)\n",error);
+ printf("ERROR PowerControl: GPIO set power state (rc=%d)\n",error);
}
}
return TRUE;
@@ -229,7 +229,7 @@
} while(0);
if (rc != GPIO_OK)
{
- printf("ERROR: GPIO setup (rc=%d)\n",rc);
+ printf("ERROR PowerControl: GPIO setup (rc=%d)\n",rc);
}
}