From 1cc99e22470b80e4c02c1a8fe2449c264c3e0295 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 9 Nov 2010 21:39:58 +0000 Subject: [PATCH] Possible quick fix for missing of True/False comparison of stable-but-not-really pages --- lib/request/comparison.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/request/comparison.py b/lib/request/comparison.py index f68ae891b..922411857 100644 --- a/lib/request/comparison.py +++ b/lib/request/comparison.py @@ -97,12 +97,12 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None): conf.matchRatio = conf.thold elif kb.pageStable and ratio > 0.6 and ratio < 1: - logger.debug("setting match ratio for current parameter to %.3f" % ratio) - conf.matchRatio = ratio + conf.matchRatio = min(ratio, 0.950) + logger.debug("setting match ratio for current parameter to %.3f" % conf.matchRatio) elif not kb.pageStable or ( kb.pageStable and ratio < 0.6 ): - logger.debug("setting match ratio for current parameter to default value 0.900") conf.matchRatio = 0.900 + logger.debug("setting match ratio for current parameter to default value 0.900") # If it has been requested to return the ratio and not a comparison # response