summaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen_json.py
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2023-02-03 11:33:39 +0100
committerDave Wallace <dwallacelf@gmail.com>2023-02-03 18:02:22 +0000
commit390874b73b21f907789daca66c45fe12a83d4ab2 (patch)
treecf48a2fea7e2357db08e7ab470740f077c4fac93 /src/tools/vppapigen/vppapigen_json.py
parent701ba9cfe3f724d3b57d6397756a571d8469fbdf (diff)
vppapigen: fix incorrect comments in json
Type: fix Signed-off-by: Ondrej Fabry <ofabry@cisco.com> Change-Id: I241cefbbce98cf6fef83f36bd87ae2c1f4b067f0 (cherry picked from commit a4f994f31e566cc5e6512d3aebf627a6e3ce2cc7)
Diffstat (limited to 'src/tools/vppapigen/vppapigen_json.py')
-rw-r--r--src/tools/vppapigen/vppapigen_json.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/vppapigen/vppapigen_json.py b/src/tools/vppapigen/vppapigen_json.py
index ba32e284d81..0a1a3d37373 100644
--- a/src/tools/vppapigen/vppapigen_json.py
+++ b/src/tools/vppapigen/vppapigen_json.py
@@ -77,7 +77,8 @@ def walk_defs(s, is_message=False):
c = {}
c["crc"] = "{0:#0{1}x}".format(t.crc, 10)
c["options"] = t.options
- c["comment"] = t.comment
+ if t.comment:
+ c["comment"] = t.comment
d.append(c)
r.append(d)