From 9e13ac1c048051ecbaf0e214597cf478863b917f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 20 Jul 2014 16:25:12 -0400 Subject: [PATCH] Increase log message verbosity; fix import. --- app.fcgi | 5 +++-- copyvios/checker.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.fcgi b/app.fcgi index 1195ee8..85d622c 100755 --- a/app.fcgi +++ b/app.fcgi @@ -54,8 +54,9 @@ def add_new_cookies(response): @app.after_request def write_access_log(response): - msg = u"%s %s -> %s" - app.logger.debug(msg, asctime(), request.path, response.status_code) + msg = u"%s %s %s %s -> %s" + app.logger.debug(msg, asctime(), request.method, request.path, + request.values.to_dict(), response.status_code) return response @app.teardown_appcontext diff --git a/copyvios/checker.py b/copyvios/checker.py index ddf968a..1d2fe20 100644 --- a/copyvios/checker.py +++ b/copyvios/checker.py @@ -5,6 +5,7 @@ from hashlib import sha256 from urlparse import urlparse from earwigbot import exceptions +from earwigbot.wiki.copyvios.markov import EMPTY from .misc import Query, get_cache_db from .sites import get_site, get_sites @@ -113,7 +114,7 @@ def _get_cached_results(page, conn, query): def _do_copyvio_compare(query, page, url): result = page.copyvio_compare(url, min_confidence=T_SUSPECT, max_time=30) - if result.source_chain is not page.EMPTY: + if result.source_chain is not EMPTY: return result query.error = "timeout" if result.time > 30 else "no data"