Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b441c03

Browse files
committedAug 29, 2024
fix: armor os.path.basename call in exception handler
1 parent 050291c commit b441c03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎aider/report.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def exception_handler(exc_type, exc_value, exc_traceback):
6565
parts = line.split('"')
6666
if len(parts) > 1:
6767
full_path = parts[1]
68-
basename = os.path.basename(full_path)
68+
try:
69+
basename = os.path.basename(full_path)
70+
except Exception:
71+
basename = full_path
6972
line = line.replace(full_path, basename)
7073
tb_lines_with_basenames.append(line)
7174

0 commit comments

Comments
 (0)
Please sign in to comment.