summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-03-16 00:00:06 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2017-03-16 00:20:01 +0530
commitca4c446757471b9dd8410fa6e624bb3eea36d647 (patch)
treeda4036cf7bc7595682402e57a9e13de273f30f27 /scripts
parentbe703f71a3048c72ed567c397cd7caaf5f3d1bcf (diff)
downloadphosphor-host-ipmid-ca4c446757471b9dd8410fa6e624bb3eea36d647.zip
phosphor-host-ipmid-ca4c446757471b9dd8410fa6e624bb3eea36d647.tar.gz
inventory: undo the capitilization of yaml decoder
yaml decoder capitalize the boolean values which is not liked by c++ compiler so undoing the capitalization. Change-Id: I1de142de76e21b2759db759c5a182c42400e34d1 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/writesensor.mako.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index 0b8d5f1..fbfe6a9 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -24,17 +24,16 @@ extern const IdInfoMap sensors = {
{"${dbus_property}",{
% for offset,values in property_value.iteritems():
{ ${offset},{
-<%
- valueType = values["type"]
-%>
+ <% valueType = values["type"] %>\
% for name,value in values.iteritems():
% if name == "type":
-<%
- continue
-%>
+ <% continue %>\
% endif
% if valueType == "string":
std::string("${value}"),
+ % elif valueType == "bool":
+ <% value = str(value).lower() %>\
+ ${value},
% else:
${value},
% endif
OpenPOWER on IntegriCloud