1
0
Fork 0

wordreference: prevent some crash i guess

This commit is contained in:
dece 2021-12-13 15:04:39 +01:00
parent aded5b32cd
commit 93a73e0248

View file

@ -192,7 +192,9 @@ def parse_common_cells(cells, meaning, is_new_meaning):
def parse_example_cells(cells, meaning):
"""Parse cells of an example line (pretty much just the last one)."""
meaning.ex.append(cells[-1].span.text)
last_cell = cells[-1]
if (span := last_cell.span):
meaning.ex.append(span.text)
def print_meaning(meaning):