diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-03-16 00:00:06 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2017-03-16 00:20:01 +0530 |
commit | ca4c446757471b9dd8410fa6e624bb3eea36d647 (patch) | |
tree | da4036cf7bc7595682402e57a9e13de273f30f27 | |
parent | be703f71a3048c72ed567c397cd7caaf5f3d1bcf (diff) | |
download | phosphor-host-ipmid-ca4c446757471b9dd8410fa6e624bb3eea36d647.tar.gz phosphor-host-ipmid-ca4c446757471b9dd8410fa6e624bb3eea36d647.zip |
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>
-rw-r--r-- | scripts/writesensor.mako.cpp | 11 |
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 |