Add filtering of invalid results, otherwise it'll propagate

This commit is contained in:
Daniel Goldberg 2018-03-27 20:54:18 +03:00
parent b06d92331d
commit 095510e8e2
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ class AzureCollector(object):
:return: List of (user/pass), possibly empty
"""
results = [self.extractor(filepath) for filepath in self.file_list]
results = [x for x in results if x]
LOG.info("Found %d Azure VM access configuration file", len(results))
return results