summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/sdbusplus/property.py6
-rw-r--r--tools/sdbusplus/templates/interface.mako.server.hpp2
2 files changed, 1 insertions, 7 deletions
diff --git a/tools/sdbusplus/property.py b/tools/sdbusplus/property.py
index c74754d..33c7e25 100644
--- a/tools/sdbusplus/property.py
+++ b/tools/sdbusplus/property.py
@@ -11,12 +11,6 @@ class Property(NamedElement, Renderer):
self.flags = kwargs.pop('flags', [])
self.errors = kwargs.pop('errors', [])
- # Convert True/False to 'true'/'false'
- # because it will be rendered as C++ code
- if (self.defaultValue is not None and
- isinstance(self.defaultValue, bool)):
- self.defaultValue = 'true' if self.defaultValue else 'false'
-
super(Property, self).__init__(**kwargs)
def is_enum(self):
diff --git a/tools/sdbusplus/templates/interface.mako.server.hpp b/tools/sdbusplus/templates/interface.mako.server.hpp
index 0774fe5..b263c7a 100644
--- a/tools/sdbusplus/templates/interface.mako.server.hpp
+++ b/tools/sdbusplus/templates/interface.mako.server.hpp
@@ -139,7 +139,7 @@ ${ m.cpp_prototype(loader, interface=interface, ptype='callback-header') }
sdbusplus::SdBusInterface *_intf;
% for p in interface.properties:
- % if p.defaultValue is not None:
+ % if p.defaultValue:
${p.cppTypeParam(interface.name)} _${p.camelCase} = \
% if p.is_enum():
${p.cppTypeParam(interface.name)}::\
OpenPOWER on IntegriCloud