From 6fc66dd8ecc3052e2f703654cf0a137fe24006a7 Mon Sep 17 00:00:00 2001 From: Thomas Haller <thaller@redhat.com> Date: Fri, 19 Jul 2024 11:19:01 +0200 Subject: doc: workaround LINK_DOC with empty libnl.dict Seems recent asciidoc leave us with an empty "libnl.dict". This breaks the script. It's not clear to me, why this happens, or why we need to LINK_DOC at all. Just work around it, so it no longer crashes. --- doc/doxygen-link.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/doxygen-link.py b/doc/doxygen-link.py index 2dcd5f0..1f424fc 100755 --- a/doc/doxygen-link.py +++ b/doc/doxygen-link.py @@ -43,4 +43,6 @@ def translate(match): rc = re.compile(r"\b(" + "|".join(map(re.escape, sorted(links, reverse=True))) + r")\b") for line in open(sys.argv[2], "r"): - print(rc.sub(translate, line), end="") + if links: + line = rc.sub(translate, line) + print(line, end="") -- cgit v0.12