Don't attempt to pull from empty cache file
Change-Id: Id26e954f347c35703e506abdc8ecf5146f2efb61 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: 2010155 Task: 45808
This commit is contained in:
parent
9700000b35
commit
aae5632aa1
@ -73,6 +73,7 @@ class Loader(object):
|
|||||||
with open(self._cache_filename, 'r', encoding=self._encoding) as f:
|
with open(self._cache_filename, 'r', encoding=self._encoding) as f:
|
||||||
self._cache = yaml.safe_load(f.read())
|
self._cache = yaml.safe_load(f.read())
|
||||||
|
|
||||||
|
if self._cache:
|
||||||
# Save the cached scanner output to the same attribute
|
# Save the cached scanner output to the same attribute
|
||||||
# it would be in if we had loaded it "live". This
|
# it would be in if we had loaded it "live". This
|
||||||
# simplifies some of the logic in the other methods.
|
# simplifies some of the logic in the other methods.
|
||||||
|
Loading…
Reference in New Issue
Block a user