settings: device errors don't eliminiate setting

This commit is contained in:
Peter F. Patel-Schneider 2022-12-06 14:10:26 -05:00
parent fe901fe3c2
commit f3a0b85e2b
1 changed files with 6 additions and 4 deletions

View File

@ -1251,9 +1251,10 @@ def check_feature(device, sclass):
if _log.isEnabledFor(_DEBUG): if _log.isEnabledFor(_DEBUG):
_log.debug('check_feature %s [%s] detected %s', sclass.name, sclass.feature, detected) _log.debug('check_feature %s [%s] detected %s', sclass.name, sclass.feature, detected)
return detected return detected
except Exception: except Exception as e:
from traceback import format_exc from traceback import format_exc
_log.error('check_feature %s [%s] error %s', sclass.name, sclass.feature, format_exc()) _log.error('check_feature %s [%s] error %s\n%s', sclass.name, sclass.feature, e, format_exc())
return False # differentiate from an error-free determination that the setting is not supported
# Returns True if device was queried to find features, False otherwise # Returns True if device was queried to find features, False otherwise
@ -1274,7 +1275,8 @@ def check_feature_settings(device, already_known):
already_known.append(setting) already_known.append(setting)
if sclass.name in newAbsent: if sclass.name in newAbsent:
newAbsent.remove(sclass.name) newAbsent.remove(sclass.name)
elif sclass.name not in newAbsent and sclass.name not in absent and sclass.name not in device.persister: elif setting is None:
if sclass.name not in newAbsent and sclass.name not in absent and sclass.name not in device.persister:
newAbsent.append(sclass.name) newAbsent.append(sclass.name)
if device.persister and newAbsent: if device.persister and newAbsent:
absent.extend(newAbsent) absent.extend(newAbsent)