[Python-modules-commits] [sphinx] 03/04: Fix xapian search adapter crashes

Dmitry Shachnev mitya57 at moszumanska.debian.org
Tue Dec 20 13:34:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch master
in repository sphinx.

commit 522c72624702ca5763b47fe257ee6984b5dae53c
Author: Takeshi KOMIYA <i.tkomiya at gmail.com>
Date:   Fri Dec 16 19:44:27 2016 +0900

    Fix xapian search adapter crashes
    
    Origin: upstream, https://github.com/sphinx-doc/sphinx/commit/cf795894b9290c5a
    Bug: https://github.com/sphinx-doc/sphinx/issues/3246
    Patch-Name: fix_xapian_search.diff
---
 sphinx/websupport/search/xapiansearch.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sphinx/websupport/search/xapiansearch.py b/sphinx/websupport/search/xapiansearch.py
index 1e43dcb..aa7cff8 100644
--- a/sphinx/websupport/search/xapiansearch.py
+++ b/sphinx/websupport/search/xapiansearch.py
@@ -39,16 +39,16 @@ class XapianSearch(BaseSearch):
         # Ensure the db lock is removed.
         del self.database
 
-    def add_document(self, path, title, text):
+    def add_document(self, pagename, filename, title, text):
         self.database.begin_transaction()
         # sphinx_page_path is used to easily retrieve documents by path.
-        sphinx_page_path = '"sphinxpagepath%s"' % path.replace('/', '_')
+        sphinx_page_path = '"sphinxpagepath%s"' % pagename.replace('/', '_')
         # Delete the old document if it exists.
         self.database.delete_document(sphinx_page_path)
 
         doc = xapian.Document()
         doc.set_data(text)
-        doc.add_value(self.DOC_PATH, path)
+        doc.add_value(self.DOC_PATH, pagename)
         doc.add_value(self.DOC_TITLE, title)
         self.indexer.set_document(doc)
         self.indexer.index_text(text)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx.git



More information about the Python-modules-commits mailing list