From 57b54f3da7d9c4f5c0700bdd70d39954583ca1b2 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 30 Jul 2025 13:52:25 +0100 Subject: 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 --- python/vyos/xml_ref/generate_op_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') 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 -- cgit v1.2.3