From dfa373c1d7f549ae8c6d0c1f6216251c988be2a5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 20 Dec 2021 12:34:13 +1100 Subject: [PATCH] autotest: param_parse.py: correct JSON output --- Tools/autotest/param_metadata/jsonemit.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tools/autotest/param_metadata/jsonemit.py b/Tools/autotest/param_metadata/jsonemit.py index d1077bee6b..36212197e2 100644 --- a/Tools/autotest/param_metadata/jsonemit.py +++ b/Tools/autotest/param_metadata/jsonemit.py @@ -12,7 +12,6 @@ class JSONEmit(Emit): json_fname = 'apm.pdef.json' self.f = open(json_fname, mode='w') self.content = {"json": {"version": 0}} - self.name = '' def close(self): json.dump(self.content, self.f, indent=2, sort_keys=True) @@ -33,7 +32,7 @@ class JSONEmit(Emit): # Copy content to avoid any modification g = copy.deepcopy(g) - self.content[self.name] = {} + self.content[g.name] = {} # Check all params available for param in g.params: @@ -97,4 +96,4 @@ class JSONEmit(Emit): # Update main content with actual content for key in content: - self.content[self.name][key] = content[key] + self.content[g.name][key] = content[key]