Proper patch for #4591

This commit is contained in:
Miroslav Stampar 2021-03-08 15:40:05 +01:00
parent 1e8bf1c78a
commit 4e65ff4689
2 changed files with 5 additions and 6 deletions

View file

@ -151,14 +151,13 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
seq1 = seq1.split("\n")
seq2 = seq2.split("\n")
key = None
else:
key = (hash(seq1), hash(seq2))
seqMatcher.set_seq1(seq1)
seqMatcher.set_seq2(seq2)
try:
key = (hash(seq1), hash(seq2))
except:
key = None
if key in kb.cache.comparison:
ratio = kb.cache.comparison[key]
else: