Empty set for no elog lookup meta data
Create an empty set when there is no elog lookup meta data instead of
defaulting to add a single empty string entry.
Tested:
Built image and verified empty string no longer in errors where no
meta data is defined.
Change-Id: I7bf1ff2ab18f174d4cfa78cf22eeac4918033148
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp b/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp
index c9361d8..2e5c785 100644
--- a/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp
+++ b/tools/phosphor-logging/templates/elog-lookup-template.mako.cpp
@@ -35,7 +35,11 @@
index = name.rfind('.')
name = name[:index] + ".Error" + name[index:]
%>\
+ %if (meta_string):
{"${name}",{"${meta_string}"}},
+ %else:
+ {"${name}",{}},
+ %endif
% endfor
};