From aae5632aa19242bdd5e5abc2d919cdcb0b1b9e15 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 19 Jul 2022 13:50:00 +0100 Subject: [PATCH] Don't attempt to pull from empty cache file Change-Id: Id26e954f347c35703e506abdc8ecf5146f2efb61 Signed-off-by: Stephen Finucane Story: 2010155 Task: 45808 --- reno/loader.py | 1 + 1 file changed, 1 insertion(+) diff --git a/reno/loader.py b/reno/loader.py index 18d451f..c4455cd 100644 --- a/reno/loader.py +++ b/reno/loader.py @@ -73,6 +73,7 @@ class Loader(object): with open(self._cache_filename, 'r', encoding=self._encoding) as f: self._cache = yaml.safe_load(f.read()) + if self._cache: # Save the cached scanner output to the same attribute # it would be in if we had loaded it "live". This # simplifies some of the logic in the other methods.