Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dogweather committed Dec 18, 2023
1 parent d5a2daf commit 4276b20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public_law/parsers/usa/colorado/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ def _parse_divisions_or_articles(title_number: NonemptyString, dom: Selector | X
article_nodes = dom.xpath("//TA-LIST")

if len(division_nodes) > 0:
return parse_divisions(title_number, dom, logger)
func = parse_divisions
elif len(article_nodes) > 0:
return parse_articles(title_number, dom, logger)
func = parse_articles
else:
raise Exception(f"Could not parse divisions or articles in Title {title_number}. Neither T-DIV nor TA-LIST nodes were found.")

return func(title_number, dom, logger)

0 comments on commit 4276b20

Please sign in to comment.