Check that 'uefispec_concern' is not empty before logging an error message.

This commit is contained in:
Assaf Carlsbad
2020-01-16 14:41:46 +02:00
committed by npmitche
parent 666d075213
commit cc63edbc46
@@ -178,10 +178,11 @@ class access_uefispec(BaseModule):
self.logger.log_bad("Variable {} should be read only.".format(name))
res = ModuleResult.FAILED
self.logger.log('')
self.logger.log_bad('Variables with attributes that differ from UEFI spec:')
for name in uefispec_concern:
self.logger.log(' {}'.format(name))
if len(uefispec_concern) > 0:
self.logger.log('')
self.logger.log_bad('Variables with attributes that differ from UEFI spec:')
for name in uefispec_concern:
self.logger.log(' {}'.format(name))
if do_modify:
self.logger.log('')