diff options
| author | Daniil Baturin <daniil@baturin.org> | 2025-07-30 13:52:25 +0100 |
|---|---|---|
| committer | Daniil Baturin <daniil@baturin.org> | 2025-07-30 13:52:25 +0100 |
| commit | 57b54f3da7d9c4f5c0700bdd70d39954583ca1b2 (patch) | |
| tree | 94ddc7dec22779bb034de3ab4769275e0b5bc457 /python | |
| parent | a551fa45573ef57858904773d4bcc99dbf553b19 (diff) | |
| download | vyos-1x-57b54f3da7d9c4f5c0700bdd70d39954583ca1b2.tar.gz vyos-1x-57b54f3da7d9c4f5c0700bdd70d39954583ca1b2.zip | |
op-mode: T7669: render placeholders in commands with curly brackets
to distinguish them from fixed parts of the command
and allow rendering commands using a template processor
Diffstat (limited to 'python')
| -rwxr-xr-x | python/vyos/xml_ref/generate_op_cache.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/xml_ref/generate_op_cache.py b/python/vyos/xml_ref/generate_op_cache.py index 266c81cd0..dec693032 100755 --- a/python/vyos/xml_ref/generate_op_cache.py +++ b/python/vyos/xml_ref/generate_op_cache.py @@ -81,7 +81,7 @@ def translate_position(s: str, pos: list[str]) -> str: # preferred to .format(*list) to avoid collisions with braces for i, p in enumerate(pos): - t = t.replace(f'_place_holder_{i+1}_', p) + t = t.replace(f'_place_holder_{i+1}_', f'{{{{{p}}}}}') return t |
