From 6661de5af63fca54d615881678543135ea8e58ad Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 28 Sep 2020 20:58:55 +0530 Subject: cerbero: Do not warn about non-existent cache file This is unnecessary. Happens every single time you wipe. Part-of: --- cerbero/build/cookbook.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cerbero/build/cookbook.py b/cerbero/build/cookbook.py index 4b30ce8d..819e43d9 100644 --- a/cerbero/build/cookbook.py +++ b/cerbero/build/cookbook.py @@ -316,11 +316,15 @@ class CookBook (object): return USER_COOKBOOK_FILE def _restore_cache(self): + self.status = {} + cachefile = self._cache_file(self.get_config()) + if not os.path.isfile(cachefile): + # From-scratch build + return try: - with open(self._cache_file(self.get_config()), 'rb') as f: + with open(cachefile, 'rb') as f: self.status = pickle.load(f) except Exception: - self.status = {} m.warning(_("Could not recover status")) def save(self): -- cgit v1.2.3