Skip to content

Commit

Permalink
MA: fix vote motion_text check
Browse files Browse the repository at this point in the history
  • Loading branch information
NewAgeAirbender committed Aug 9, 2024
1 parent f6e6eae commit cc73464
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scrapers/ma/votes.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,14 @@ def parse_match(self, match, index):
"""
raw_motion_text = match.group("rawmotion")

motion_text = self.precise_motion_re.search(raw_motion_text).group(1)
motion_text = self.precise_motion_re.search(raw_motion_text)
if motion_text:
motion_text = motion_text.group(1)
else:
self.logger.warn(
f"No valid motion text found preceding vote lines in {self.source}"
)
return
single_line_motion = motion_text.replace("\n", " ")

normalized_motion = single_line_motion.capitalize()
Expand Down

0 comments on commit cc73464

Please sign in to comment.