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

[1649] address review comments

parent bbd3fd0f
......@@ -150,13 +150,13 @@ def _find_spec_part_single(cur_spec, id_part):
# list or a map, which is internally represented by a dict with
# an element 'map_item_spec', a dict with an element 'list_item_spec',
# or a list (when it is the 'main' config_data element of a module).
if type(cur_spec) == dict and spec_part_is_map(cur_spec):
if spec_part_is_map(cur_spec):
for cur_spec_item in cur_spec['map_item_spec']:
if cur_spec_item['item_name'] == id:
return cur_spec_item
# not found
raise + " not found")
elif type(cur_spec) == dict and spec_part_is_list(cur_spec):
elif spec_part_is_list(cur_spec):
if cur_spec['item_name'] == id:
return cur_spec['list_item_spec']
# not found
......@@ -203,7 +203,7 @@ def find_spec_part(element, identifier, strict_identifier = True):
if strict_identifier and spec_part_is_list(cur_el) and\
raise +
" is a list and needs index")
" is a list and needs an index")
cur_el = _get_map_or_list(cur_el)
cur_el = _find_spec_part_single(cur_el, id_parts[-1])
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