[Zope-Checkins] CVS: Releases/Zope/lib/python/ZTUtils - Zope.py:1.11.42.2

Evan Simpson cvs-admin at zope.org
Fri Oct 24 16:14:07 EDT 2003


Update of /cvs-repository/Releases/Zope/lib/python/ZTUtils
In directory cvs.zope.org:/tmp/cvs-serv11069/lib/python/ZTUtils

Modified Files:
      Tag: Zope-2_7-branch
	Zope.py 
Log Message:
Make Python 2.3 BooleanType work with ZTUtils marshalling.


=== Releases/Zope/lib/python/ZTUtils/Zope.py 1.11.42.1 => 1.11.42.2 ===
--- Releases/Zope/lib/python/ZTUtils/Zope.py:1.11.42.1	Mon Jul 21 12:37:40 2003
+++ Releases/Zope/lib/python/ZTUtils/Zope.py	Fri Oct 24 16:13:36 2003
@@ -36,6 +36,12 @@
 else:
     from AccessControl import Unauthorized
 
+# Support pre-Python 2.3 :-(
+try:
+    from types import BooleanType
+except ImportError:
+    BooleanType = None
+
 class LazyFilter(Lazy):
     # A LazyFilter that checks with the security policy
 
@@ -255,6 +261,8 @@
 def simple_marshal(v):
     if isinstance(v, StringType):
         return ''
+    if BooleanType and isinstance(v, BooleanType):
+        return ':boolean'
     if isinstance(v, IntType):
         return ':int'
     if isinstance(v, FloatType):




More information about the Zope-Checkins mailing list