[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/checker.py Set security on set and frozenset if running with Python 2.4

Stuart Bishop stuart at stuartbishop.net
Tue Aug 2 18:50:06 EDT 2005


Log message for revision 37671:
  Set security on set and frozenset if running with Python 2.4

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

-=-
Modified: Zope3/trunk/src/zope/security/checker.py
===================================================================
--- Zope3/trunk/src/zope/security/checker.py	2005-08-02 22:36:14 UTC (rev 37670)
+++ Zope3/trunk/src/zope/security/checker.py	2005-08-02 22:50:05 UTC (rev 37671)
@@ -659,6 +659,14 @@
     zope.interface.declarations.Declaration: _Declaration_checker,
 }
 
+# If we are running with Python 2.4+, setup security on the builtin
+# set and frozenset types.
+try:
+    _default_checkers[set] = _setChecker
+    _default_checkers[frozenset] = _setChecker
+except NameError:
+    pass
+
 def _clear():
     _checkers.clear()
     _checkers.update(_default_checkers)



More information about the Zope3-Checkins mailing list