From da260fabf901f08eddbd7c133d97677af63ab51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Wed, 4 Dec 2024 23:15:58 +0100 Subject: [PATCH] infamy: restconf: Add support to delete individual entries in leaf-lists --- test/infamy/restconf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/infamy/restconf.py b/test/infamy/restconf.py index 4cb7de71..b1ebeed1 100644 --- a/test/infamy/restconf.py +++ b/test/infamy/restconf.py @@ -33,7 +33,7 @@ def xpath_to_uri(xpath, extra=None): if matches: for key, value in matches: # replace [key=value] with =value - uri_path = re.sub(rf'\[{key}=["\']{value}["\']\]', f'={value}', xpath) + uri_path = re.sub(rf'\[{re.escape(key)}=["\']{re.escape(value)}["\']\]', f'={value}', xpath) else: uri_path = xpath