From: Marcin Koziej Date: Fri, 2 Nov 2012 13:22:01 +0000 (+0100) Subject: error message must accept None, so %d->%s X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/c2dba41b331a28fb7de510ca0e79d00e95bec99b error message must accept None, so %d->%s --- diff --git a/apps/search/index.py b/apps/search/index.py index f09a42e53..822429e75 100644 --- a/apps/search/index.py +++ b/apps/search/index.py @@ -830,11 +830,10 @@ class Search(SolrIndex): idx += 1 except IOError, e: - log.error("Cannot open snippet file for book id = %d [rev=%d], %s" % (book_id, revision, e)) + log.error("Cannot open snippet file for book id = %d [rev=%s], %s" % (book_id, revision, e)) return [] finally: - if snippets: - snippets.close() + snippets.close() # remove verse end markers.. snips = map(lambda s: s and s.replace("/\n", "\n"), snips)