Skip to content

Commit

Permalink
Improve exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
mheguy committed Aug 4, 2024
1 parent c89abf8 commit 615aae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transcription_bot/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def find_single_element(soup: "BeautifulSoup | Tag", name: str, class_name: str
results = soup.find_all(name, class_=class_name)

if len(results) != 1:
raise ValueError("Unexpected number of description elements extracted, expected 1, got %s", len(results))
raise ValueError(f"Unexpected number of description elements extracted, expected 1, got {len(results)}")

return results[0]

Expand Down

0 comments on commit 615aae5

Please sign in to comment.