Browse Source

Fallback to empty dict for load

master
Raphael Roberts 5 years ago
parent
commit
2e86269a85
  1. 4
      tibi_hardlinks/cache.py

4
tibi_hardlinks/cache.py

@ -32,8 +32,8 @@ class Cache:
stored_data = pickle.load(file) stored_data = pickle.load(file)
if isinstance(stored_data, dict): if isinstance(stored_data, dict):
self._store = stored_data self._store = stored_data
else:
self._store = dict()
return
self._store = dict()
def store(self): def store(self):
with lzma.open(self.filepath, "wb") as file: with lzma.open(self.filepath, "wb") as file:

Loading…
Cancel
Save