mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 21:13:00 +02:00
infamy: restconf: Add support to delete individual entries in leaf-lists
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user