Patch for an Issue #1066

This commit is contained in:
Miroslav Stampar 2014-12-26 22:24:28 +01:00
parent bc91884c4d
commit 1e014de6be

View File

@ -135,10 +135,16 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
while True: while True:
try: try:
seqMatcher.set_seq1(seq1) seqMatcher.set_seq1(seq1)
except MemoryError:
seq1 = seq1[:len(seq1) / 1024]
else:
break
while True:
try:
seqMatcher.set_seq2(seq2) seqMatcher.set_seq2(seq2)
except MemoryError: except MemoryError:
seq1 = seq1[:len(seq1) / 4] seq2 = seq2[:len(seq2) / 1024]
seq2 = seq2[:len(seq2) / 4]
else: else:
break break