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

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


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

Changed:
  U   CMF/branches/1.6/DCWorkflow/tests/test_guard.py

-=-
Modified: CMF/branches/1.6/DCWorkflow/tests/test_guard.py
===================================================================
--- CMF/branches/1.6/DCWorkflow/tests/test_guard.py	2006-06-09 13:41:30 UTC (rev 68539)
+++ CMF/branches/1.6/DCWorkflow/tests/test_guard.py	2006-06-09 13:53:14 UTC (rev 68540)
@@ -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