[Zope-Checkins] SVN: Zope/branches/hannosch-dtml-vs-accesscontrol/src/AccessControl/Permissions.py Avoid a strong dependency
Hanno Schlichting
hannosch at hannosch.eu
Sun May 16 15:41:34 EDT 2010
Log message for revision 112383:
Avoid a strong dependency
Changed:
U Zope/branches/hannosch-dtml-vs-accesscontrol/src/AccessControl/Permissions.py
-=-
Modified: Zope/branches/hannosch-dtml-vs-accesscontrol/src/AccessControl/Permissions.py
===================================================================
--- Zope/branches/hannosch-dtml-vs-accesscontrol/src/AccessControl/Permissions.py 2010-05-16 19:35:33 UTC (rev 112382)
+++ Zope/branches/hannosch-dtml-vs-accesscontrol/src/AccessControl/Permissions.py 2010-05-16 19:41:34 UTC (rev 112383)
@@ -66,8 +66,11 @@
webdav_lock_items='WebDAV Lock items'
webdav_unlock_items='WebDAV Unlock items'
-# BBB
-from DocumentTemplate import permissions
-
-change_dtml_documents = permissions.change_dtml_documents
-change_dtml_methods = permissions.change_dtml_methods
+# BBB - conditional dependency
+try:
+ from DocumentTemplate import permissions
+except ImportError:
+ pass
+else:
+ change_dtml_documents = permissions.change_dtml_documents
+ change_dtml_methods = permissions.change_dtml_methods
More information about the Zope-Checkins
mailing list