Commit 7f7c99f1 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

check on config add/remove if the given identifier actually leads to a list


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@486 e5f2f494-b856-4b98-b285-d166d9295462
parent ba1c2fbd
......@@ -330,6 +330,8 @@ class UIConfigData():
def add(self, identifier, value_str):
data_spec = find_spec(self.config.specification, identifier)
if (type(data_spec) != dict or "list_item_spec" not in data_spec):
raise DataTypeError(identifier + " is not a list")
value = parse_value_str(value_str)
check_type(data_spec, [value])
cur_list = find_no_exc(self.config_changes, identifier)
......@@ -343,6 +345,8 @@ class UIConfigData():
def remove(self, identifier, value_str):
data_spec = find_spec(self.config.specification, identifier)
if (type(data_spec) != dict or "list_item_spec" not in data_spec):
raise DataTypeError(identifier + " is not a list")
value = parse_value_str(value_str)
check_type(data_spec, [value])
cur_list = find_no_exc(self.config_changes, identifier)
......
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