[Zope3-checkins] SVN: Zope3/trunk/src/zope/exceptions/__init__.py The dependency avoidance code did not work for me; when import zope.security

Marius Gedminas marius at pov.lt
Thu Aug 26 16:14:32 EDT 2004


Log message for revision 27285:
  The dependency avoidance code did not work for me; when import zope.security
  fails I get ImportError: no module named security, which does not end with
  the string " zope.security".
  
  


Changed:
  U   Zope3/trunk/src/zope/exceptions/__init__.py


-=-
Modified: Zope3/trunk/src/zope/exceptions/__init__.py
===================================================================
--- Zope3/trunk/src/zope/exceptions/__init__.py	2004-08-26 20:13:12 UTC (rev 27284)
+++ Zope3/trunk/src/zope/exceptions/__init__.py	2004-08-26 20:14:32 UTC (rev 27285)
@@ -28,9 +28,10 @@
 try:
     import zope.security
 except ImportError, v:
-    if not str(v).endswith(' zope.security'):
+    # "ImportError: No module named security"
+    if not str(v).endswith(' security'):
         raise
-else:    
+else:
     from zope.security.interfaces import IUnauthorized, Unauthorized
     from zope.security.interfaces import IForbidden, IForbiddenAttribute
     from zope.security.interfaces import Forbidden, ForbiddenAttribute



More information about the Zope3-Checkins mailing list