[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/ZCatalog/__init__.py
Removed a warning at Zope startup.
Florent Guillaume
fg at nuxeo.com
Thu Jun 1 07:53:33 EDT 2006
Log message for revision 68433:
Removed a warning at Zope startup.
Changed:
U Zope/trunk/lib/python/Products/ZCatalog/__init__.py
-=-
Modified: Zope/trunk/lib/python/Products/ZCatalog/__init__.py
===================================================================
--- Zope/trunk/lib/python/Products/ZCatalog/__init__.py 2006-06-01 11:52:56 UTC (rev 68432)
+++ Zope/trunk/lib/python/Products/ZCatalog/__init__.py 2006-06-01 11:53:33 UTC (rev 68433)
@@ -15,8 +15,16 @@
import ZCatalog, CatalogAwareness, CatalogPathAwareness
from Products.PluginIndexes.TextIndex import Vocabulary
-from ZClasses import createZClassForBase
+# BBB: ZClasses are deprecated but we don't want the warning to appear here
+import warnings
+warnings.filterwarnings('ignore', message='^ZClasses', append=1)
+try:
+ from ZClasses import createZClassForBase
+finally:
+ del warnings.filters[-1]
+ del __warningregistry__
+
createZClassForBase( ZCatalog.ZCatalog , globals()
, 'ZCatalogBase', 'ZCatalog' )
createZClassForBase( CatalogAwareness.CatalogAware, globals()
More information about the Zope-Checkins
mailing list