From c2dba41b331a28fb7de510ca0e79d00e95bec99b Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Fri, 2 Nov 2012 14:22:01 +0100 Subject: [PATCH] error message must accept None, so %d->%s --- apps/search/index.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) -- 2.20.1