浏览代码

Fix when we've cached None as a url.

tags/v0.2
Ben Kurtovic 12 年前
父节点
当前提交
4ff7612a27
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 6
- 1
earwigbot/wiki/copyvios/__init__.py 查看文件

@@ -230,8 +230,13 @@ class CopyvioMixIn(object):
content = self.get()
clean = ArticleTextParser(content).strip()
article_chain = MarkovChain(clean)
confidence, chains = self._copyvio_compare_content(article_chain, url)

if not url:
empty = MarkovChain("")
chns = (empty, MarkovChainIntersection(empty, empty))
return CopyvioCheckResult(False, 0, url, 0, 0, article_chain, chns)

confidence, chains = self._copyvio_compare_content(article_chain, url)
ctime = time() - start_time
if confidence >= min_confidence:
is_violation = True


正在加载...
取消
保存