From 714cd11d043d0cfb650aa46c35603a7498960f20 Mon Sep 17 00:00:00 2001 From: Rip&Tear <84775494+theCyberTech@users.noreply.github.com> Date: Fri, 19 Jun 2026 14:42:16 +0800 Subject: [PATCH] Potential fix for pull request finding 'Empty except' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- lib/crewai-core/src/crewai_core/settings.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/crewai-core/src/crewai_core/settings.py b/lib/crewai-core/src/crewai_core/settings.py index f294426c5..c54f2ddb6 100644 --- a/lib/crewai-core/src/crewai_core/settings.py +++ b/lib/crewai-core/src/crewai_core/settings.py @@ -39,8 +39,12 @@ def _ensure_dir_mode(directory: Path) -> None: if directory.resolve() in shared: return directory.chmod(0o700) - except OSError: - pass + except OSError as e: + logger.debug( + "Could not enforce 0o700 on config directory %s (best-effort): %s", + directory, + e, + ) def _write_secure_json(path: Path, data: dict[str, Any]) -> None: