Skip to content

Commit

Permalink
fix(ova): correctly check for body
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Jan 25, 2023
1 parent 88e626f commit e18396e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arguebuf/converters/from_ova.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ def _inject_original_text(
) -> None:
doc = html.fromstring(f"<html><head></head><body>{raw_text}</body></html>")
text = ""
body = doc.find("body")

if body := doc.find("body"):
if body is not None:
for elem in body.iter():
# Span elements need special handling
if elem.tag == "span":
Expand Down

0 comments on commit e18396e

Please sign in to comment.