[Zope-Checkins] CVS: Zope/lib/python/AccessControl -
ZopeSecurityPolicy.py:1.20.4.4
Tres Seaver
tseaver at zope.com
Mon Jan 12 16:29:51 EST 2004
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv7355/lib/python/AccessControl
Modified Files:
Tag: Zope-2_6-branch
ZopeSecurityPolicy.py
Log Message:
- Collector #1168:
o NameError on UnicodeType.
o Add a warning for code which calls 'validate' with a non-name
passed as 'name'.
=== Zope/lib/python/AccessControl/ZopeSecurityPolicy.py 1.20.4.3 => 1.20.4.4 ===
--- Zope/lib/python/AccessControl/ZopeSecurityPolicy.py:1.20.4.3 Fri Jan 9 14:07:16 2004
+++ Zope/lib/python/AccessControl/ZopeSecurityPolicy.py Mon Jan 12 16:29:50 2004
@@ -19,6 +19,8 @@
_use_python_impl = 0
import os
+import warnings
+
if os.environ.get("ZOPE_SECURITY_POLICY", None) == "PYTHON":
_use_python_impl = 1
else:
@@ -144,6 +146,11 @@
p=p.get(name, None)
else:
p = 1
+ if name is not None:
+ warnings.warn(
+ 'ZSP.validate called with non-name: %s'
+ % name
+ )
else:
p=p(name, value)
More information about the Zope-Checkins
mailing list