Commit b31b7eff authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[1649] remove superfluous / from identifier

parent 811f0ab9
......@@ -651,8 +651,11 @@ class MultiConfigData:
entry = _create_value_map_entry(module, 'module', None)
result.append(entry)
else:
# Strip off start and end slashes, if they are there
if identifier[0] == '/':
identifier = identifier[1:]
if identifier[-1] == '/':
identifier = identifier[:-1]
module, sep, id = identifier.partition('/')
spec = self.get_module_spec(module)
if spec:
......
......@@ -602,6 +602,9 @@ class TestMultiConfigData(unittest.TestCase):
]
maps = self.mcd.get_value_maps("/Spec22/value9")
self.assertEqual(expected, maps)
# A slash at the end should not produce different output
maps = self.mcd.get_value_maps("/Spec22/value9/")
self.assertEqual(expected, maps)
def test_get_value_maps_named_set(self):
module_spec = isc.config.module_spec_from_file(self.data_path + os.sep + "spec32.spec")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment