summaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-06-29 11:32:33 +0200
committerDamjan Marion <dmarion@me.com>2018-06-29 11:18:22 +0000
commit10a0989a30f00e4705078ccfc0c03e8a7652eb2d (patch)
tree580d5da0cd66217ed93ba42f745eafb5bb6f2d02 /src/tools/vppapigen
parentc2fc57e8df45c0ddcd39c8b3d34e1b02e290e5ab (diff)
CSIT-1148: VPPAPIGEN 2nd level import of .api ignored
Change-Id: I73dcab0c5ff2405b1fcba25975955e1267a4ac4e Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/tools/vppapigen')
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index 5cedfb214e5..f3094ec0a84 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -685,12 +685,13 @@ class VPPAPI(object):
# Only allow the following object types from imported file
if in_import and not (isinstance(o, Enum) or
isinstance(o, Union) or
- isinstance(o, Typedef)):
+ isinstance(o, Typedef) or
+ isinstance(o, Import)):
continue
- result.append(o)
-
if isinstance(o, Import):
self.process_imports(o.result, True, result)
+ else:
+ result.append(o)
# Add message ids to each message.
def add_msg_id(s):
@@ -764,7 +765,7 @@ def main():
# Debug
if args.debug:
import pprint
- pp = pprint.PrettyPrinter(indent=4)
+ pp = pprint.PrettyPrinter(indent=4, stream=sys.stderr)
for t in s['Define']:
pp.pprint([t.name, t.flags, t.block])
for t in s['types']: