scripts/liberty: Support new comma only syntax.
Syntax before; ``` comp_attribute blah,blah ``` Syntax after; ``` comp_attribute,blah,blah ``` Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
e14136b064
commit
d7a58ea703
|
@ -965,8 +965,9 @@ def liberty_dict(dtype, dvalue, data, indent=tuple(), attribute_types=None):
|
|||
# Sort the attributes
|
||||
def attr_sort_key(item):
|
||||
k, v = item
|
||||
if " " in k:
|
||||
ktype, kvalue = k.split(" ", 1)
|
||||
|
||||
if "," in k:
|
||||
ktype, kvalue = k.split(",", 1)
|
||||
sortable_kv = sortable_extracted_numbers(kvalue)
|
||||
else:
|
||||
ktype = k
|
||||
|
@ -1042,7 +1043,7 @@ def liberty_dict(dtype, dvalue, data, indent=tuple(), attribute_types=None):
|
|||
o.append('%s%s : "%s";' % (INDENT*len(indent_n), k, l))
|
||||
|
||||
else:
|
||||
raise ValueError("Unknown %s: %r\n%s" % (k, v, indent_n))
|
||||
raise ValueError("Unknown %s: %r\n%s" % ((ktype, kvalue, k), v, indent_n))
|
||||
|
||||
else:
|
||||
if ktype in dtype_attribute_types:
|
||||
|
|
Loading…
Reference in New Issue