mirror of
https://opendev.org/x/pyghmi
synced 2025-01-27 19:37:44 +00:00
Protect more unspported instance variables
A new category of settings have instances without declaring maximum instances. Autosense and hide these sorts of settings. Change-Id: I5334d6fad76454674dc0c1ffa094c2178e950c66
This commit is contained in:
parent
ce62bdda95
commit
03aabc6fd3
@ -305,6 +305,9 @@ class LenovoFirmwareConfig(object):
|
||||
name = setting.find("mriName").text
|
||||
help = setting.find("desc").text
|
||||
onedata = setting.find('text_data')
|
||||
if onedata:
|
||||
if len(list(onedata.iter('instance'))) > 1:
|
||||
protect = True
|
||||
if onedata is not None:
|
||||
if onedata.get('password') == 'true':
|
||||
protect = True
|
||||
@ -312,6 +315,10 @@ class LenovoFirmwareConfig(object):
|
||||
if enumdata is not None:
|
||||
if enumdata.get('maxinstance') is not None:
|
||||
protect = True
|
||||
for currchoice in enumdata.iter('choice'):
|
||||
if len(list(currchoice.iter('instance'))) > 1:
|
||||
protect = True
|
||||
break
|
||||
if onedata is None:
|
||||
onedata = setting.find('numeric_data')
|
||||
if onedata is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user