Update injectxmlparams.py

Add extraction of Boolean attributes in injectxmlparams.py.
This commit is contained in:
makekam 2024-02-23 23:32:35 +08:00 committed by Daniel Agar
parent 5dfdf8c071
commit d988005216
1 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class XMLInject():
def __init__(self, injected_xml_filename):
self.groups=[]
valid_parameter_attributes = set(["category", "default", "name", "type", "volatile"])
valid_parameter_attributes = set(["category", "default", "name", "type", "volatile", "boolean"])
valid_field_tags = set(["board","short_desc", "long_desc", "min", "max", "unit", "decimal", "increment", "reboot_required"])
valid_other_top_level_tags = set(["group","values"])
@ -42,7 +42,8 @@ class XMLInject():
new_param.default = iparam.get('default')
elif param_attrib == 'volatile':
new_param.SetVolatile()
elif param_attrib == "boolean":
new_param.SetBoolean()
#get param info stored as child tags
for child in iparam: