From 9606ba3efe9d61458ad2ede6f0639856d580ef7e Mon Sep 17 00:00:00 2001 From: Marri Devender Rao Date: Mon, 21 Aug 2017 03:42:31 -0500 Subject: Modify mako script to generate code for empty interfaces Allow generating code for empty interfaces in the FRU map. Empty interfaces are used to determine the type of the inventory object. Change-Id: I945998627b88bc68374b631d1b14328cd611cb39 Signed-off-by: Marri Devender Rao --- scripts/writefru.mako.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/writefru.mako.cpp') diff --git a/scripts/writefru.mako.cpp b/scripts/writefru.mako.cpp index 82941a4..0a0a14f 100644 --- a/scripts/writefru.mako.cpp +++ b/scripts/writefru.mako.cpp @@ -12,10 +12,11 @@ extern const FruMap frus = { {"${object}",{ % for interface,properties in interfaces.items(): {"${interface}",{ - % for dbus_property,property_value in properties.items(): - {"${dbus_property}",{ - "${property_value.get("IPMIFruSection", "")}", - "${property_value.get("IPMIFruProperty", "")}", \ + % if properties: + % for dbus_property,property_value in properties.items(): + {"${dbus_property}",{ + "${property_value.get("IPMIFruSection", "")}", + "${property_value.get("IPMIFruProperty", "")}", \ <% delimiter = property_value.get("IPMIFruValueDelimiter") if not delimiter: @@ -25,7 +26,8 @@ extern const FruMap frus = { %> "${delimiter}" }}, - % endfor + % endfor + %endif }}, % endfor }}, -- cgit v1.2.1