Skip to content

Commit

Permalink
ci: Windows tell me ur secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Jan 3, 2025
1 parent 7fb237c commit b9883a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions anta/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ def setup_logging(level: LogLevel = Log.INFO, file: Path | None = None) -> None:

def _get_file_handler(logger_instance: logging.Logger, file: Path) -> logging.FileHandler | None:
"""Return the FileHandler if present."""
for handler in logger_instance.handlers:
if isinstance(handler, logging.FileHandler):
print(handler.baseFilename) # noqa: T201

return (
next((handler for handler in logger_instance.handlers if isinstance(handler, logging.FileHandler) and handler.baseFilename == str(file)), None)
if logger_instance.hasHandlers()
Expand Down

0 comments on commit b9883a3

Please sign in to comment.