Skip to content

Commit

Permalink
Merge pull request #5003 from NewAgeAirbender/ma_updates
Browse files Browse the repository at this point in the history
MA: fix vote motion_text check
  • Loading branch information
NewAgeAirbender authored Aug 9, 2024
2 parents f6e6eae + cc73464 commit 7bad67b
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 7bad67b

Please sign in to comment.