changeset 1532:5e7dd6dd485a

fix backtrace on SystemInfo when no xapian is installed, but xapian_search is enabled in wikiconfig
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 05 Sep 2006 03:22:54 +0200
parents b369a5c3f3e2
children a0bc6cf91e5d
files MoinMoin/macro/SystemInfo.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/SystemInfo.py	Tue Sep 05 02:39:58 2006 +0200
+++ b/MoinMoin/macro/SystemInfo.py	Tue Sep 05 03:22:54 2006 +0200
@@ -126,10 +126,11 @@
                     _('N/A'))
         xapRow += ', %s, %s' % (available, mtime)
 
+    try:
         import xapian
         xapVersion = xapian.xapian_version_string()
-    else:
-        xapVersion = _('not installed')
+    except ImportError:
+        xapVersion = _('Xapian and/or Python Xapian bindings not installed')
 
     row(_('Xapian search'), xapRow)
     row(_('Xapian Version'), xapVersion)