mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 02:16:21 +00:00
Account for corrupt cache (skip loading)
This commit is contained in:
1 parent
ec397617e8
commit
f0d4c5f09f
1 file changed
+5
-1
@@ -1345,7 +1345,11 @@ class LanguageServer:
|
||||
return
|
||||
self.logger.log(f"Loading document symbols cache from {self._cache_path}", logging.INFO)
|
||||
with open(self._cache_path, "rb") as f:
|
||||
self._document_symbols_cache = pickle.load(f)
|
||||
try:
|
||||
self._document_symbols_cache = pickle.load(f)
|
||||
except:
|
||||
# cache often becomes corrupt, so just skip loading it
|
||||
pass
|
||||
|
||||
|
||||
@ensure_all_methods_implemented(LanguageServer)
|
||||
|
||||
Reference in new issue
Block a user