diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-09-28 20:58:55 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-01-25 14:50:20 +0530 |
commit | 6661de5af63fca54d615881678543135ea8e58ad (patch) | |
tree | e3604138e52b8153b6cf355233752e9ad8ec06fc | |
parent | c36c78f3bcdb8a6cf9bd887e729ca6b758e93a6f (diff) |
cerbero: Do not warn about non-existent cache file
This is unnecessary. Happens every single time you wipe.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/784>
-rw-r--r-- | cerbero/build/cookbook.py | 8 |
1 files 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): |