projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8a303e6
)
try / except pour démarrer sans Solr.
author
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 16 Jul 2014 09:36:00 +0000
(11:36 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 16 Jul 2014 09:36:00 +0000
(11:36 +0200)
__init__.py
patch
|
blob
|
history
diff --git
a/__init__.py
b/__init__.py
index
d4f4f53
..
fe63530
100755
(executable)
--- a/
__init__.py
+++ b/
__init__.py
@@
-38,7
+38,11
@@
import GroupDataTool
import RegistrationTool
import CalendarTool
import AttachmentTool
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
from PloneMisc import IndexIterator, Batch
import patch
@@
-57,8
+61,9
@@
tools = ( MembershipTool.MembershipTool
, RegistrationTool.RegistrationTool
, CalendarTool.CalendarTool
, AttachmentTool.AttachmentTool
, RegistrationTool.RegistrationTool
, CalendarTool.CalendarTool
, AttachmentTool.AttachmentTool
- , catalog.CatalogTool
)
)
+if __solr_ok :
+ tools += (catalog.CatalogTool,)
# register files extensions
registerFileExtension('ttf', FSFile)
# register files extensions
registerFileExtension('ttf', FSFile)