Style nits, trailing whitespace.

This commit is contained in:
Georg Brandl 2010-07-20 10:03:34 +01:00
parent a2b3fd4bbe
commit 6faa8885fb
3 changed files with 9 additions and 9 deletions

View File

@ -10,22 +10,22 @@ class StorageBackend(object):
"""Add a node to the StorageBackend.
`document` is the name of the document the node belongs to.
`line` is the line in the source where the node begins.
`source` is the source files name.
`treeloc` is for future use.
"""
raise NotImplementedError()
def post_build(self):
"""Called after a build has completed. Use this to finalize the
addition of nodes if needed.
"""
pass
def add_comment(self, parent_id, text, displayed, username,
def add_comment(self, parent_id, text, displayed, username,
rating, time):
"""Called when a comment is being added."""
raise NotImplementedError()
@ -34,7 +34,7 @@ class StorageBackend(object):
"""Called to retrieve all comments for a node."""
raise NotImplementedError()
def add_proposal(self, parent_id, text, displayed, username,
def add_proposal(self, parent_id, text, displayed, username,
rating, time):
raise NotImplementedError()

View File

@ -40,10 +40,10 @@ class WhooshSearch(BaseSearch):
def finish_indexing(self):
self.index_writer.commit()
def add_document(self, pagename, title, text):
self.index_writer.add_document(path=unicode(pagename),
title=title,
title=title,
text=text)
def handle_query(self, q):

View File

@ -28,7 +28,7 @@ class XapianSearch(BaseSearch):
def init_indexing(self, changed=[]):
ensuredir(self.db_path)
self.database = xapian.WritableDatabase(self.db_path,
self.database = xapian.WritableDatabase(self.db_path,
xapian.DB_CREATE_OR_OPEN)
self.indexer = xapian.TermGenerator()
stemmer = xapian.Stem("english")
@ -37,7 +37,7 @@ class XapianSearch(BaseSearch):
def finish_indexing(self):
# Ensure the db lock is removed.
del self.database
def add_document(self, path, title, text):
self.database.begin_transaction()
# sphinx_page_path is used to easily retrieve documents by path.