mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
fix: Save empty dict to cache file on download failure
This commit is contained in:
parent
788956e86d
commit
aac45097ca
1 changed files with 2 additions and 3 deletions
|
@ -754,10 +754,9 @@ class ModelInfoManager:
|
|||
pass
|
||||
except Exception as ex:
|
||||
print(str(ex))
|
||||
finally:
|
||||
# Touch the cache file to update its mtime even if download failed
|
||||
try:
|
||||
self.cache_file.touch()
|
||||
# Save empty dict to cache file on failure
|
||||
self.cache_file.write_text("{}")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue