Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dogweather committed Dec 19, 2023
1 parent fd721e4 commit 6b5d545
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public_law/parsers/usa/colorado/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def parse_title_bang(dom: XmlResponse, logger: Any) -> Title:
return title


def parse_title(dom: XmlResponse, logger: Any) -> Title | None:
def parse_title(dom: XmlResponse, logger: Any) -> Optional[Title]:
match(dom.xpath("//TITLE-TEXT/text()").get()):
case str(raw_name):
name = NonemptyString(titleize(raw_name))
Expand Down Expand Up @@ -60,6 +60,7 @@ def _parse_divisions_or_articles(title_number: NonemptyString, dom: Selector | X
else:
msg = f"""Could not parse divisions or articles in Title {title_number}.
Neither T-DIV nor TA-LIST nodes were found."""
raise Exception(msg)
logger.warn(msg)
return None

return func(title_number, dom, logger)

0 comments on commit 6b5d545

Please sign in to comment.