From ca4c446757471b9dd8410fa6e624bb3eea36d647 Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Thu, 16 Mar 2017 00:00:06 +0530 Subject: 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 --- scripts/writesensor.mako.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.1