Skip to content

Commit

Permalink
IL: guard to avoid passing empty voter name
Browse files Browse the repository at this point in the history
  • Loading branch information
jessemortenson committed Jan 9, 2025
1 parent 587365c commit 40d29be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scrapers/il/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ def scrape_pdf_for_votes(self, session, actor, date, motion, href):
# Converts "Davis,William" to "Davis, William".
name = re.sub(r"\,([a-zA-Z])", r", \1", name)

if name == "":
self.logger.warning(f"Found empty voter name in parsing vote at {href}")
continue

if vcode == "Y":
yes_votes.append(name)
elif vcode == "N":
Expand Down

0 comments on commit 40d29be

Please sign in to comment.