fix: Handle errors when loading tags cache

This commit is contained in:
Paul Gauthier 2024-08-27 05:27:17 -07:00 committed by Paul Gauthier (aider)
parent d12ab8c8c3
commit 743412777d

View file

@ -163,9 +163,11 @@ class RepoMap:
def load_tags_cache(self):
path = Path(self.root) / self.TAGS_CACHE_DIR
if not path.exists():
self.cache_missing = True
self.TAGS_CACHE = Cache(path)
try:
self.TAGS_CACHE = Cache(path)
except sqlite3.OperationalError:
self.io.tool_error(f"Unable to use tags cache, delete {path} to resolve.")
self.TAGS_CACHE = dict()
def save_tags_cache(self):
pass