Fix the real root cause, files not containing a banner.

This commit is contained in:
Mike Auty
2017-07-17 17:11:05 +01:00
parent 9b9792f3e2
commit 23ccb4d4c8
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ class LinuxSymbolFinder(interfaces.automagic.AutomagicInterface):
if not self._linux_banners:
return
mss = scanners.MultiStringScanner(list(self._linux_banners))
mss = scanners.MultiStringScanner([x for x in self._linux_banners if x is not None])
layer = context.memory[layer_name]
@@ -29,8 +29,6 @@ class LinuxSymbolCache(interfaces.automagic.AutomagicInterface):
vollog.log(constants.LOGLEVEL_V,
"Removing cached path {} for banner {}: files does not exist".format(path, banner))
linuxbanners[banner].remove(path)
# Rewrite it in case we found any files that were no logner present
cls.save_linux_banners(linuxbanners)
return linuxbanners
@classmethod