Minor update

This commit is contained in:
Miroslav Štampar
2026-07-04 21:45:42 +02:00
parent 3bab3cd795
commit 6597415ab0
5 changed files with 121 additions and 17 deletions
+3 -1
View File
@@ -1283,7 +1283,9 @@ def checkDynamicContent(firstPage, secondPage):
seqMatcher.set_seq1(firstPage)
seqMatcher.set_seq2(secondPage)
ratio = seqMatcher.quick_ratio()
except MemoryError:
except (MemoryError, TypeError, SystemError, ValueError, AttributeError):
# difflib can fail on pathological input or, rarely, with interpreter-level
# errors under heavy threading; degrade to "undetermined" instead of crashing
ratio = None
if ratio is None: