dts/extract_dts_includes.py: Quote strings values

If the value of the property is a string quote it on output.  This lets
us use things like label properties that will have values of strings.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-05-16 15:38:34 -05:00 committed by Anas Nashif
commit 21ef8a6acc

View file

@ -380,10 +380,14 @@ def extract_single(node_address, yaml, prop, key, prefix, defs, def_label):
for i, p in enumerate(prop):
k = convert_string_to_label(key).upper()
label = def_label + '_' + k
if isinstance(p, str):
p = "\"" + p + "\""
prop_def[label + '_' + str(i)] = p
else:
k = convert_string_to_label(key).upper()
label = def_label + '_' + k
if isinstance(prop, str):
prop = "\"" + prop + "\""
prop_def[label] = prop
if node_address in defs: