From c3ddc3d35a077ad3c1c20faf535b4b24c3141468 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 30 Jun 2014 22:16:40 -0400 Subject: [PATCH] Return the correct empty chain. --- earwigbot/wiki/copyvios/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/earwigbot/wiki/copyvios/__init__.py b/earwigbot/wiki/copyvios/__init__.py index 55b9f91..5e5dc2f 100644 --- a/earwigbot/wiki/copyvios/__init__.py +++ b/earwigbot/wiki/copyvios/__init__.py @@ -110,7 +110,8 @@ class CopyvioMixIn(object): """ html = self._open_url_ignoring_errors(url) if not html: - return 0, () + empty = MarkovChain("") + return 0, (empty, MarkovChainIntersection(empty, empty)) source = MarkovChain(HTMLTextParser(html).strip()) delta = MarkovChainIntersection(article, source)