Skip to content

Commit 631b9f4

Browse files
Fix for pull request finding 'Empty except'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent e03aba5 commit 631b9f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/crewai-tools/src/crewai_tools/security/safe_path.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def format_path_for_display(path: str, base_dir: str | None = None) -> str:
3232
resolved_path = os.path.realpath(path)
3333
if os.path.commonpath([resolved_base, resolved_path]) == resolved_base:
3434
return os.path.relpath(resolved_path, resolved_base)
35-
except (OSError, ValueError):
36-
pass
35+
except (OSError, ValueError) as exc:
36+
logger.debug("Falling back to basename for display path formatting: %s", exc)
3737

3838
return os.path.basename(os.path.realpath(path)) or "[redacted path]"
3939

0 commit comments

Comments
 (0)