summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2024-07-19 09:19:01 (GMT)
committerThomas Haller <thaller@redhat.com>2024-07-19 09:19:01 (GMT)
commit6fc66dd8ecc3052e2f703654cf0a137fe24006a7 (patch)
tree6e162dea68fede39ac76ca508532f45d9428aa93
parent914812a9bf76bc57e9c7bad54f1f6c4c99e8d1ca (diff)
downloadlibnl-6fc66dd8ecc3052e2f703654cf0a137fe24006a7.zip
libnl-6fc66dd8ecc3052e2f703654cf0a137fe24006a7.tar.gz
libnl-6fc66dd8ecc3052e2f703654cf0a137fe24006a7.tar.bz2
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.
-rwxr-xr-xdoc/doxygen-link.py4
1 files changed, 3 insertions, 1 deletions
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="")