mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
feat: delete version check file on uncaught exceptions
This commit is contained in:
parent
efcaaae5b4
commit
2c6de179b0
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@ import webbrowser
|
|||
|
||||
from aider import __version__
|
||||
from aider.urls import github_issues
|
||||
from aider.versioncheck import VERSION_CHECK_FNAME
|
||||
|
||||
FENCE = "`" * 3
|
||||
|
||||
|
@ -91,6 +92,13 @@ def exception_handler(exc_type, exc_value, exc_traceback):
|
|||
# We don't want any more exceptions
|
||||
sys.excepthook = None
|
||||
|
||||
# Check if VERSION_CHECK_FNAME exists and delete it if so
|
||||
try:
|
||||
if VERSION_CHECK_FNAME.exists():
|
||||
VERSION_CHECK_FNAME.unlink()
|
||||
except Exception:
|
||||
pass # Swallow any errors
|
||||
|
||||
# Format the traceback
|
||||
tb_lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue