summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Andersen <c.andersen@kostal.com>2016-12-09 15:48:50 +0100
committerChristian Andersen <c.andersen@kostal.com>2016-12-09 15:53:05 +0100
commit768f128c369aac30689b3b3ceebf1b43a4949158 (patch)
tree0146494c8f757541ed0a825dacc47d880b6deaaa
parente416398bdabac6aea443a30e874b5f297fed4687 (diff)
downloadsdbusplus-768f128c369aac30689b3b3ceebf1b43a4949158.tar.gz
sdbusplus-768f128c369aac30689b3b3ceebf1b43a4949158.zip
sdbus++: Fix generation of enums
The fix to openbmc/sdbusplus#4 broke the generation of enums, because enums are currently not directly parsed by the cpp type conversion. This also means that there is additional work required to support enums nested into containers. Fixes openbmc/sdbusplus#8 Change-Id: I4f206fa899d84128bc7463d54c5b83e40e28d61f Signed-off-by: Christian Andersen <c.andersen@kostal.com>
-rw-r--r--tools/sdbusplus/property.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/sdbusplus/property.py b/tools/sdbusplus/property.py
index 3a0bf23..435af28 100644
--- a/tools/sdbusplus/property.py
+++ b/tools/sdbusplus/property.py
@@ -144,7 +144,9 @@ class Property(NamedElement, Renderer):
# syntax.
result += '<'
if entry.get('noparse'):
- result += ", ".join(rest)
+ # Do not parse the parameter list, just use the first element
+ # of each tuple and ignore possible parameters
+ result += ", ".join([e[0] for e in rest])
else:
result += ", ".join(map(lambda e: self.__parse_cpp_type__(e),
rest))
OpenPOWER on IntegriCloud