mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
fix: protect os.path.basename call with try/except
This commit is contained in:
parent
725da4ba9f
commit
8f7250e992
1 changed files with 4 additions and 1 deletions
|
@ -85,7 +85,10 @@ def exception_handler(exc_type, exc_value, exc_traceback):
|
|||
# Get the filename and line number from the innermost frame
|
||||
filename = innermost_tb.tb_frame.f_code.co_filename
|
||||
line_number = innermost_tb.tb_lineno
|
||||
basename = os.path.basename(filename)
|
||||
try:
|
||||
basename = os.path.basename(filename)
|
||||
except Exception:
|
||||
basename = filename
|
||||
|
||||
# Get the exception type name
|
||||
exception_type = exc_type.__name__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue