Skip to content

Commit

Permalink
cleaner logging output
Browse files Browse the repository at this point in the history
  • Loading branch information
drewda committed Dec 18, 2024
1 parent 7842023 commit 60337b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/check-feed-urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path
from typing import Dict, Any, List, Optional, Union, TypedDict, Literal
import logging
import string

logger = logging.getLogger('dmfr_validator')

Expand Down Expand Up @@ -76,9 +77,10 @@ def validate_feed_url(url: str, dmfr_path: str) -> bool:
)

if result.returncode != 0:
output = ''.join(c for c in (result.stdout if result.stdout else result.stderr) if c in string.printable)
logger.error(
f"Validation failed for {url} in {dmfr_path}\n" +
(result.stdout if result.stdout else result.stderr)
output
)
return False

Expand Down

0 comments on commit 60337b8

Please sign in to comment.