mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54: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
|
pass
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print(str(ex))
|
print(str(ex))
|
||||||
finally:
|
|
||||||
# Touch the cache file to update its mtime even if download failed
|
|
||||||
try:
|
try:
|
||||||
self.cache_file.touch()
|
# Save empty dict to cache file on failure
|
||||||
|
self.cache_file.write_text("{}")
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue