Skip to content

Commit 4bd95a4

Browse files
committed
tools: output a JSON object for single entries
XXX this only happens when outputting to the standard output. This is relevant to FreeBSD's ports. Sponsored by: The FreeBSD Foundation Signed-off-by: Pierre Pronchery <pierre@defora.net>
1 parent 1b05edc commit 4bd95a4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools/vuxml/convert_vuxml.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ def main():
314314
entries.append(entry)
315315

316316
if output is None:
317-
print(json.dumps(entries, indent=4))
317+
if len(entries) == 1:
318+
print(json.dumps(entries[0], indent=4))
319+
else:
320+
print(json.dumps(entries, indent=4))
318321

319322
return ret
320323

0 commit comments

Comments
 (0)