[Zope-CVS] CVS: Products/Ape/lib/apelib/zodb3 - connection.py:1.2
Shane Hathaway
shane@zope.com
Sat, 12 Apr 2003 23:13:17 -0400
Update of /cvs-repository/Products/Ape/lib/apelib/zodb3
In directory cvs.zope.org:/tmp/cvs-serv13519/lib/apelib/zodb3
Modified Files:
connection.py
Log Message:
Updated to be compatible with the latest ZODB. The _invalidating attribute
was renamed to _modified. Remains compatible with former versions of ZODB3
as well.
=== Products/Ape/lib/apelib/zodb3/connection.py 1.1 => 1.2 ===
--- Products/Ape/lib/apelib/zodb3/connection.py:1.1 Wed Apr 9 23:09:58 2003
+++ Products/Ape/lib/apelib/zodb3/connection.py Sat Apr 12 23:13:17 2003
@@ -154,6 +154,11 @@
assert oid != 'unmanaged', repr(object)
#invalid=self._invalidated.get
invalid = self._invalid
+
+ modified = getattr(self, '_modified', None)
+ if modified is None:
+ modified = self._invalidating
+
if oid is None or object._p_jar is not self:
# new object
oid = self.new_oid()
@@ -168,7 +173,7 @@
invalid(None)
):
raise ConflictError(object=object)
- self._invalidating.append(oid)
+ modified.append(oid)
else:
# Nothing to do
@@ -213,7 +218,7 @@
invalid(None)
):
raise ConflictError(object=object)
- self._invalidating.append(oid)
+ modified.append(oid)
# SDH: hook in the serializer.
# state=object.__getstate__()