changeset 858:db0e4edcb6ac

fallback to moinSearch if xapian is actived but not installed
author Franz Pletz <fpletz AT franz-pletz DOT org>
date Mon, 19 Jun 2006 11:37:09 +0200
parents d93a8a6a4559
children c76dd5d97e0e
files MoinMoin/search.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search.py	Mon Jun 19 11:31:00 2006 +0200
+++ b/MoinMoin/search.py	Mon Jun 19 11:37:09 2006 +0200
@@ -1368,8 +1368,11 @@
         return moin search in those pages.
         """
         pages = None
-        index = Xapian.Index(self.request)
-        if index.exists() and self.query.xapian_wanted():
+        try:
+            index = Xapian.Index(self.request)
+        except NameError:
+            index = None
+        if index and index.exists() and self.query.xapian_wanted():
             self.request.clock.start('_xapianSearch')
             try:
                 from MoinMoin.support import xapwrap