summaryrefslogtreecommitdiffstats
path: root/tools/update-dbus-docs.py
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-08-27 20:15:30 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-08-27 21:30:23 +0200
commit04aa6fa8cd08546e8ae6257db60174ad6d7e3689 (patch)
tree9dd95c48eb43db5066c9a7015706f53a63dc4281 /tools/update-dbus-docs.py
parenttest: verify that dbus docs are fresh (diff)
downloadsystemd-04aa6fa8cd08546e8ae6257db60174ad6d7e3689.tar.xz
systemd-04aa6fa8cd08546e8ae6257db60174ad6d7e3689.zip
update-dbus-docs: omit verbose output when in --test mode
It makes the ninja output listing very long for no good purpose.
Diffstat (limited to 'tools/update-dbus-docs.py')
-rwxr-xr-xtools/update-dbus-docs.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/update-dbus-docs.py b/tools/update-dbus-docs.py
index 448206cf95..0bbc4aab45 100755
--- a/tools/update-dbus-docs.py
+++ b/tools/update-dbus-docs.py
@@ -15,8 +15,6 @@ PARSER = etree.XMLParser(no_network=True,
strip_cdata=False,
resolve_entities=False)
-PRINT_ERRORS = True
-
class NoCommand(Exception):
pass
@@ -38,7 +36,7 @@ def print_method(declarations, elem, *, prefix, file, is_signal=False):
argname = arg.get('name')
if argname is None:
- if PRINT_ERRORS:
+ if opts.print_errors:
print(f'method {name}: argument {num+1} has no name', file=sys.stderr)
argname = 'UNNAMED'
@@ -140,7 +138,7 @@ def check_documented(document, declarations, stats):
assert False, (klass, item)
if not document_has_elem_with_text(document, elem, item_repr):
- if PRINT_ERRORS:
+ if opts.print_errors:
print(f'{klass} {item} is not documented :(')
missing.append((klass, item))
@@ -283,7 +281,9 @@ def parse_args():
help='only verify that everything is up2date')
p.add_argument('--build-dir', default='build')
p.add_argument('pages', nargs='+')
- return p.parse_args()
+ opts = p.parse_args()
+ opts.print_errors = not opts.test
+ return opts
if __name__ == '__main__':
opts = parse_args()