[Zope-Checkins]
SVN: Zope/branches/2.10/lib/python/Products/PluginIndexes/__init__.py
Removed a warning at Zope startup.
Florent Guillaume
fg at nuxeo.com
Thu Jun 1 07:48:09 EDT 2006
Log message for revision 68430:
Removed a warning at Zope startup.
Changed:
U Zope/branches/2.10/lib/python/Products/PluginIndexes/__init__.py
-=-
Modified: Zope/branches/2.10/lib/python/Products/PluginIndexes/__init__.py
===================================================================
--- Zope/branches/2.10/lib/python/Products/PluginIndexes/__init__.py 2006-06-01 10:54:18 UTC (rev 68429)
+++ Zope/branches/2.10/lib/python/Products/PluginIndexes/__init__.py 2006-06-01 11:48:09 UTC (rev 68430)
@@ -16,13 +16,21 @@
import common.UnIndex as UnIndex
import PathIndex.PathIndex
-import TextIndex.TextIndex
import FieldIndex.FieldIndex
import KeywordIndex.KeywordIndex
import TopicIndex.TopicIndex
import DateIndex.DateIndex
import DateRangeIndex.DateRangeIndex
+# BBB: TextIndex is deprecated but we don't want the warning to appear here
+import warnings
+warnings.filterwarnings('ignore', message='^Using TextIndex', append=1)
+try:
+ import TextIndex.TextIndex
+finally:
+ del warnings.filters[-1]
+ del __warningregistry__
+
_indexes = ('TextIndex',
'KeywordIndex',
'FieldIndex',
More information about the Zope-Checkins
mailing list