Skip to content

Commit

Permalink
Better logging (#203)
Browse files Browse the repository at this point in the history
* poetry update

* refactor

* logging

* logging
  • Loading branch information
dogweather committed Dec 19, 2023
1 parent 0f9ae4b commit 40f4ab0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions public_law/parsers/usa/colorado/crs.py
Expand Up @@ -36,7 +36,6 @@ def parse_title(dom: XmlResponse, logger: Any) -> Optional[Title]:

match _parse_divisions_or_articles(number, dom, logger):
case None:
logger.warn(f"Could not parse divisions or articles in Title {number}")
return None
case children:
url_number = number.rjust(2, "0")
Expand All @@ -58,8 +57,7 @@ def _parse_divisions_or_articles(title_number: NonemptyString, dom: Selector | X
elif len(article_nodes) > 0:
func = parse_articles
else:
msg = f"""Could not parse divisions or articles in Title {title_number}.
Neither T-DIV nor TA-LIST nodes were found."""
msg = f"Could not parse divisions or articles in Title {title_number}. Neither T-DIV nor TA-LIST nodes were found."
logger.warn(msg)
return None

Expand Down

0 comments on commit 40f4ab0

Please sign in to comment.