[CMF-checkins] SVN: CMF/trunk/DCWorkflow/tests/test_guard.py Avoid deprecation warning with Zope 2.10.

Florent Guillaume fg at nuxeo.com
Fri Jun 9 09:53:44 EDT 2006


Log message for revision 68542:
  Avoid deprecation warning with Zope 2.10.

Changed:
  U   CMF/trunk/DCWorkflow/tests/test_guard.py

-=-
Modified: CMF/trunk/DCWorkflow/tests/test_guard.py
===================================================================
--- CMF/trunk/DCWorkflow/tests/test_guard.py	2006-06-09 13:53:32 UTC (rev 68541)
+++ CMF/trunk/DCWorkflow/tests/test_guard.py	2006-06-09 13:53:44 UTC (rev 68542)
@@ -19,7 +19,11 @@
 import Testing
 
 from AccessControl import getSecurityManager
-from Products.PageTemplates.TALES import CompilerError
+try:
+    from zope.tales.tales import CompilerError
+except ImportError:
+    # BBB: Zope < 2.10
+    from Products.PageTemplates.TALES import CompilerError
 
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFCore.tests.base.dummy import DummySite



More information about the CMF-checkins mailing list