render: display lists of things as comma separated

This commit is contained in:
William Ballenthin
2020-06-28 08:47:50 -06:00
parent 9f2c4248e5
commit 67c511e085

View File

@@ -86,6 +86,8 @@ def render_vverbose(doc):
v = rule['meta'][key]
if isinstance(v, list) and len(v) == 1:
v = v[0]
elif isinstance(v, list) and len(v) > 1:
v = ', '.join(v)
rows.append((key, v))
ostream.writeln(tabulate.tabulate(rows, tablefmt='plain'))