From 3e8feb517d2cc4022ff3afd787478376db59fd10 Mon Sep 17 00:00:00 2001 From: yvesf Date: Wed, 1 Dec 2010 17:27:07 +0100 Subject: fix request time --- web.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web.py') diff --git a/web.py b/web.py index 03a7eda..756d03b 100644 --- a/web.py +++ b/web.py @@ -139,8 +139,8 @@ def do_search(term=None): filepath = book[0] with index_metadata.searcher() as searcher: docnum = searcher.document_number(path=filepath) - with index_metadata.reader() as reader2: - title = reader2.stored_fields(docnum).get("title") + with index_metadata.reader() as metadata_reader: + title = metadata_reader.stored_fields(docnum).get("title") books[docnum] = { "matches" : [], "title":title, @@ -154,7 +154,7 @@ def do_search(term=None): return flask.render_template("search.html", books=books, term=term, - time=time.time()-time_start) + time_taken=time.time()-time_start) def log_response(sender, response): sender.logger.debug("Request context is about to close down. " -- cgit v1.2.1