From: Otto Moerbeek Date: Tue, 26 Nov 2024 13:14:06 +0000 (+0100) Subject: rec: fix quoting issue in #14886 X-Git-Tag: rec-5.2.0-rc1~23^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F14892%2Fhead;p=thirdparty%2Fpdns.git rec: fix quoting issue in #14886 --- diff --git a/pdns/recursordist/settings/generate.py b/pdns/recursordist/settings/generate.py index bae4efc1e6..d342bfed24 100644 --- a/pdns/recursordist/settings/generate.py +++ b/pdns/recursordist/settings/generate.py @@ -706,11 +706,12 @@ def gen_oldstyle_docs(srcdir, entries): runtime = entry['runtime'] if not isinstance(runtime, list): runtime = [runtime] - for k,v in enumerate(runtime): - runtime[k] = '``' + runtime[k] + '``' + li = [] + for v in runtime: if v == 'reload-yaml': continue - file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in runtime)}\n\n") + li.append('``' + v + '``') + file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in li)}\n\n") file.write(entry['doc'].strip()) file.write('\n\n') @@ -772,11 +773,13 @@ def gen_newstyle_docs(srcdir, argentries): runtime = entry['runtime'] if not isinstance(runtime, list): runtime = [runtime] - for k,v in enumerate(runtime): - runtime[k] = '``' + runtime[k] + '``' + li = [] + for v in runtime: + vv = '``' + v + '``' if v == 'reload-yaml': - runtime[k] = 'since 5.2.0: ' + runtime[k] - file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in runtime)}\n\n") + vv = 'since 5.2.0: ' + vv + li.append(vv) + file.write(f"- Runtime modifiable using ``rec_control`` {', '.join(f'{w}' for w in li)}\n\n") if 'doc-new' in entry: file.write(fixxrefs(entries, entry['doc-new'].strip())) else: diff --git a/pdns/recursordist/settings/table.py b/pdns/recursordist/settings/table.py index fc7604ed45..f3d647ffa4 100644 --- a/pdns/recursordist/settings/table.py +++ b/pdns/recursordist/settings/table.py @@ -792,7 +792,7 @@ That is, only if both the limits apply, the record will not be cached. This deci 'help' : 'If we should never cache IPv4 ECS responses', 'doc' : ''' When set, never cache replies carrying EDNS IPv4 Client Subnet scope in the record cache. -In this case the decision made by ```ecs-ipv4-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant. +In this case the decision made by ``ecs-ipv4-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant. ''', 'versionadded': '4.5.0' }, @@ -805,7 +805,7 @@ In this case the decision made by ```ecs-ipv4-cache-bits`` and ``ecs-cache-limit 'help' : 'If we should never cache IPv6 ECS responses', 'doc' : ''' When set, never cache replies carrying EDNS IPv6 Client Subnet scope in the record cache. -In this case the decision made by ```ecs-ipv6-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant. +In this case the decision made by ``ecs-ipv6-cache-bits`` and ``ecs-cache-limit-ttl`` is no longer relevant. ''', 'versionadded': '4.5.0' }, @@ -3388,7 +3388,7 @@ Sequence of negative trust anchors. ''', 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`', 'versionadded': '5.1.0', - 'runtime': ['add-nta', 'clear-nta'], + 'runtime': ['add-nta', 'clear-nta', 'reload-lua-config', 'reload-yaml'], }, { 'name' : 'trustanchorfile', @@ -3402,6 +3402,7 @@ This can be used to read distribution provided trust anchors, as for instance `` ''', 'skip-old' : 'Equivalent Lua config in :doc:`lua-config/dnssec`', 'versionadded': '5.1.0', + 'runtime': ['reload-lua-config', 'reload-yaml'], }, { 'name' : 'trustanchorfile_interval',