From c2a59468741396a5cfccb9749ae3470955612ab8 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 16 Oct 2014 23:17:35 -0500 Subject: [PATCH] Fix generating -0.0 as a confidence value. --- earwigbot/wiki/copyvios/workers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/wiki/copyvios/workers.py b/earwigbot/wiki/copyvios/workers.py index 07a4e50..24d53cf 100644 --- a/earwigbot/wiki/copyvios/workers.py +++ b/earwigbot/wiki/copyvios/workers.py @@ -288,8 +288,8 @@ class CopyvioWorkspace(object): return (delta - 50) / delta d_size = float(delta.size) - return max(conf_with_article_and_delta(self._article.size, d_size), - conf_with_delta(d_size), 0.0) + return abs(conf_with_article_and_delta(self._article.size, d_size), + conf_with_delta(d_size)) def _finish_early(self): """Finish handling links prematurely (if we've hit min_confidence)."""