Commit a05e5373 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜 Committed by GStreamer Marge Bot
Browse files

cerbero: Do not warn about non-existent cache file

This is unnecessary. Happens every single time you wipe.

Part-of: <!622>
parent b0c71fea
...@@ -316,11 +316,15 @@ class CookBook (object): ...@@ -316,11 +316,15 @@ class CookBook (object):
return USER_COOKBOOK_FILE return USER_COOKBOOK_FILE
def _restore_cache(self): def _restore_cache(self):
self.status = {}
cachefile = self._cache_file(self.get_config())
if not os.path.isfile(cachefile):
# From-scratch build
return
try: try:
with open(self._cache_file(self.get_config()), 'rb') as f: with open(cachefile, 'rb') as f:
self.status = pickle.load(f) self.status = pickle.load(f)
except Exception: except Exception:
self.status = {}
m.warning(_("Could not recover status")) m.warning(_("Could not recover status"))
def save(self): def save(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment