settings: keep trying settings that have worked

This commit is contained in:
Peter F. Patel-Schneider 2022-04-19 17:19:52 -04:00
parent 4459ea5342
commit 055c8776cc
1 changed files with 4 additions and 4 deletions

View File

@ -1219,14 +1219,14 @@ def check_feature_settings(device, already_known):
newAbsent = []
for sclass in SETTINGS:
if sclass.feature:
if sclass.name not in absent and not any(s.name == sclass.name for s in already_known):
known_present = device.persister and sclass.name in device.persister
if not any(s.name == sclass.name for s in already_known) and (known_present or sclass.name not in absent):
setting = check_feature(device, sclass)
if setting:
already_known.append(setting)
if sclass.name in newAbsent:
newAbsent.remove(sclass.name)
else:
if not any(s.name == sclass.name for s in already_known) and sclass.name not in newAbsent:
elif sclass.name not in newAbsent and sclass.name not in absent and sclass.name not in device.persister:
newAbsent.append(sclass.name)
if device.persister and newAbsent:
absent.extend(newAbsent)