Commit 98e93921 authored by Jelte Jansen's avatar Jelte Jansen

Merge branch 'trac671'

parents 1ec7e1cc d27da407
......@@ -461,8 +461,8 @@ class MultiConfigData:
spec_part_list = spec_part['list_item_spec']
list_value, status = self.get_value(identifier)
if list_value is None:
print("Error: identifier '%s' not found" % identifier)
return
raise isc.cc.data.DataNotFoundError(identifier)
if type(list_value) != list:
# the identifier specified a single element
self._append_value_item(result, spec_part_list, identifier, all)
......
......@@ -465,8 +465,8 @@ class TestMultiConfigData(unittest.TestCase):
module_spec = isc.config.module_spec_from_file(self.data_path + os.sep + "spec24.spec")
self.mcd.set_specification(module_spec)
maps = self.mcd.get_value_maps("/Spec24/item")
self.assertEqual([], maps)
self.assertRaises(isc.cc.data.DataNotFoundError,
self.mcd.get_value_maps, "/Spec24/item", 4)
self.mcd._set_current_config({ "Spec24": { "item": [] } })
maps = self.mcd.get_value_maps("/Spec24/item")
self.assertEqual([{'default': False, 'modified': False, 'name': 'Spec24/item', 'type': 'list', 'value': []}], maps)
......
Markdown is supported
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