From fc06e9578d3d8b09689be7c58a92eec7b0175a57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Wed, 16 Jul 2014 11:36:00 +0200 Subject: [PATCH 1/1] =?utf8?q?try=20/=20except=20pour=20d=C3=A9marrer=20sa?= =?utf8?q?ns=20Solr.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- __init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index d4f4f53..fe63530 100755 --- a/__init__.py +++ b/__init__.py @@ -38,7 +38,11 @@ import GroupDataTool import RegistrationTool import CalendarTool import AttachmentTool -import catalog +try : + import catalog + __solr_ok = True +except ImportError : + __solr_ok = False from PloneMisc import IndexIterator, Batch import patch @@ -57,8 +61,9 @@ tools = ( MembershipTool.MembershipTool , RegistrationTool.RegistrationTool , CalendarTool.CalendarTool , AttachmentTool.AttachmentTool - , catalog.CatalogTool ) +if __solr_ok : + tools += (catalog.CatalogTool,) # register files extensions registerFileExtension('ttf', FSFile) -- 2.20.1