[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.18

Steve Alexander steve@cat-box.net
Wed, 23 Apr 2003 13:39:19 -0400


Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv1481/src/zope/security

Modified Files:
	checker.py 
Log Message:
Made the checker for ClassType objects more sensible.


=== Zope3/src/zope/security/checker.py 1.17 => 1.18 ===
--- Zope3/src/zope/security/checker.py:1.17	Tue Apr 22 12:22:37 2003
+++ Zope3/src/zope/security/checker.py	Wed Apr 23 13:38:49 2003
@@ -281,7 +281,7 @@
       All the names in the sequence of names or the interface are
       protected by the permission.
 
-    - A dictionoid (having anitems method), with items that are
+    - A dictionoid (having an items method), with items that are
       name/permission-id pairs.
     """
     data = {}
@@ -312,7 +312,6 @@
 
     return Checker(check)
 
-
 def selectChecker(object):
     """Get a checker for the given object
 
@@ -386,6 +385,8 @@
     return checker
 
 def _classChecker(class_):
+    # XXX This function does not appear to be used.
+    #     What is it for?
     checker = _checkers.get(class_, _typeChecker)
     if checker is _typeChecker and issubclass(class_, Exception):
         return NoProxy # XXX we should be more careful
@@ -448,7 +449,7 @@
                          '__str__']),
     types.InstanceType: _instanceChecker,
     Proxy: NoProxy,
-    types.ClassType: _classChecker,
+    types.ClassType: _typeChecker,  # XXX Check that this is right.
     types.FunctionType: _callableChecker,
     types.MethodType: _callableChecker,
     types.BuiltinFunctionType: _callableChecker,