X Tutup
Skip to content

Commit 04aa6fa

Browse files
committed
update-dbus-docs: omit verbose output when in --test mode
It makes the ninja output listing very long for no good purpose.
1 parent 4cc73cf commit 04aa6fa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/update-dbus-docs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
strip_cdata=False,
1616
resolve_entities=False)
1717

18-
PRINT_ERRORS = True
19-
2018
class NoCommand(Exception):
2119
pass
2220

@@ -38,7 +36,7 @@ def print_method(declarations, elem, *, prefix, file, is_signal=False):
3836
argname = arg.get('name')
3937

4038
if argname is None:
41-
if PRINT_ERRORS:
39+
if opts.print_errors:
4240
print(f'method {name}: argument {num+1} has no name', file=sys.stderr)
4341
argname = 'UNNAMED'
4442

@@ -140,7 +138,7 @@ def check_documented(document, declarations, stats):
140138
assert False, (klass, item)
141139

142140
if not document_has_elem_with_text(document, elem, item_repr):
143-
if PRINT_ERRORS:
141+
if opts.print_errors:
144142
print(f'{klass} {item} is not documented :(')
145143
missing.append((klass, item))
146144

@@ -283,7 +281,9 @@ def parse_args():
283281
help='only verify that everything is up2date')
284282
p.add_argument('--build-dir', default='build')
285283
p.add_argument('pages', nargs='+')
286-
return p.parse_args()
284+
opts = p.parse_args()
285+
opts.print_errors = not opts.test
286+
return opts
287287

288288
if __name__ == '__main__':
289289
opts = parse_args()

0 commit comments

Comments
 (0)
X Tutup