[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/ conditional imports, specific deps

Bernd Dorn bernd.dorn at lovelysystems.com
Sat Mar 24 11:04:23 EDT 2007


Log message for revision 73503:
  conditional imports, specific deps

Changed:
  U   Zope3/trunk/src/zope/security/checker.py
  U   Zope3/trunk/src/zope/security/management.py

-=-
Modified: Zope3/trunk/src/zope/security/checker.py
===================================================================
--- Zope3/trunk/src/zope/security/checker.py	2007-03-24 15:01:36 UTC (rev 73502)
+++ Zope3/trunk/src/zope/security/checker.py	2007-03-24 15:04:22 UTC (rev 73503)
@@ -725,5 +725,10 @@
 
 _clear()
 
-from zope.testing.cleanup import addCleanUp
-addCleanUp(_clear)
+try:
+    from zope.testing.cleanup import addCleanUp
+except ImportError:
+    pass
+else:
+    addCleanUp(_clear)
+

Modified: Zope3/trunk/src/zope/security/management.py
===================================================================
--- Zope3/trunk/src/zope/security/management.py	2007-03-24 15:01:36 UTC (rev 73502)
+++ Zope3/trunk/src/zope/security/management.py	2007-03-24 15:04:22 UTC (rev 73503)
@@ -25,7 +25,6 @@
 from zope.security.interfaces import ISecurityManagement
 from zope.security.interfaces import IInteractionManagement
 from zope.security.interfaces import NoInteraction
-from zope.testing.cleanup import addCleanUp
 import zope.thread
 
 thread_local = zope.thread.local()
@@ -37,9 +36,13 @@
     global _defaultPolicy
     _defaultPolicy = ParanoidSecurityPolicy
 
-addCleanUp(_clear)
+try:
+    from zope.testing.cleanup import addCleanUp
+except ImportError:
+    pass
+else:
+    addCleanUp(_clear)
 
-
 #
 #   ISecurityManagement implementation
 #



More information about the Zope3-Checkins mailing list