[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2 - ofsserial.py:1.12

Shane Hathaway shane at zope.com
Thu Mar 25 22:31:57 EST 2004


Update of /cvs-repository/Products/Ape/lib/apelib/zope2
In directory cvs.zope.org:/tmp/cvs-serv25695/lib/apelib/zope2

Modified Files:
	ofsserial.py 
Log Message:
Augmented the fixed property tests and fixed the breakage.

Some property types are not safely portable to databases, especially
floats and dates.  MySQL, for instance, doesn't have the
date-with-timezone type that Zope 2 needs for storing DateTime objects.
To be safe, the fixed property table code now only creates certain kinds
of columns, placing the rest in the variable properties table.



=== Products/Ape/lib/apelib/zope2/ofsserial.py 1.11 => 1.12 ===
--- Products/Ape/lib/apelib/zope2/ofsserial.py:1.11	Wed Mar 24 23:28:23 2004
+++ Products/Ape/lib/apelib/zope2/ofsserial.py	Thu Mar 25 22:31:56 2004
@@ -257,9 +257,8 @@
             if t == 'lines':
                 data = v.split('\n')
             elif t == 'boolean':
-                if (not v
-                    or v == '0'
-                    or v[:1].lower() in 'fn'): # match 0, [f]alse, [n]o
+                # match 0, [f]alse, [n]o
+                if (not v or v == '0' or v[:1].lower() in 'fn'):
                     data = 0
                 else:
                     data = 1




More information about the Zope-CVS mailing list