Commit 1f001fe2 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Tests - Tools - Mock NCE-T Controller

- Properly parse scaped URLs
parent 625cd809
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@


import json, libyang, logging
import urllib.parse
from typing import Dict, List, Optional, Set


@@ -152,7 +153,9 @@ class YangHandler:
        list name as the key name.
        """

        parts = [p for p in path.strip('/').split('/') if p != '']
        # URL-decode each path segment so escaped characters like `%22`
        # (double quotes) are properly handled when parsing list keys.
        parts = [urllib.parse.unquote(p) for p in path.strip('/').split('/') if p != '']
        schema_path = ''
        out_parts: List[str] = []