script: extract_dts_includes: fix recursive inclusion
extract_dts_includes script was not handling correctly recusrsive inclusions. Fix it. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
96efdbbf33
commit
318436589c
1 changed files with 5 additions and 12 deletions
|
@ -579,18 +579,11 @@ def yaml_traverse_inherited(node):
|
|||
"""
|
||||
|
||||
if 'inherits' in node.keys():
|
||||
try:
|
||||
yaml_traverse_inherited(node['inherits']['inherits'])
|
||||
except KeyError:
|
||||
if 'inherits' in node['inherits'].keys():
|
||||
node['inherits'] = yaml_traverse_inherited(node['inherits'])
|
||||
dict_merge(node['inherits'], node)
|
||||
node = node['inherits']
|
||||
node.pop('inherits')
|
||||
except TypeError:
|
||||
#'node['inherits']['inherits'] type is 'list' instead of
|
||||
#expected type 'dtc'
|
||||
#Likely due to use of "-" before attribute in yaml file
|
||||
raise Exception("Element '" + str(node['title']) +
|
||||
"' uses yaml 'series' instead of 'mapping'")
|
||||
return node
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue