fix for a bug reported by [email protected] (for elt in self.a)

This commit is contained in:
Miroslav Stampar
2011-05-24 15:03:21 +00:00
parent f774d8fea0
commit 0072c3af8e
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ Daniele Bellucci <[email protected]>
2006
Anthony Boynes <[email protected]>
for reporting a bug
for reporting few bugs
Velky Brat <[email protected]>
for suggesting a minor enhancement to the bisection algorithm
+4 -1
View File
@@ -72,7 +72,10 @@ def comparison(page, getRatioValue=False, pageLength=None):
else:
seqMatcher.set_seq1(getFilteredPageContent(seqMatcher.a, True) if conf.textOnly else seqMatcher.a)
seqMatcher.set_seq2(getFilteredPageContent(page, True) if conf.textOnly else page)
ratio = round(seqMatcher.quick_ratio(), 3)
if seqMatcher.a is None or seqMatcher.b is None:
ratio = None
else:
ratio = round(seqMatcher.quick_ratio(), 3)
# If the url is stable and we did not set yet the match ratio and the
# current injected value changes the url page content