X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/8a303e66fd249f6bb2f9ba0522eca355fe401ab6..a75be5ed39db7d2d87f5184ea30ce17ec8b4c5ab:/__init__.py?ds=sidebyside 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)