Commit 0318bf6d authored by Jim Fulton's avatar Jim Fulton

Changed the way conflict errors are caught and reraised to be

consistent with changes in ZODB 3.3.
parent 1cd1702b
...@@ -17,10 +17,10 @@ MappingStorage. Unlike MappingStorage, it needs not be packed to get rid of ...@@ -17,10 +17,10 @@ MappingStorage. Unlike MappingStorage, it needs not be packed to get rid of
non-cyclic garbage and it does rudimentary conflict resolution. This is a non-cyclic garbage and it does rudimentary conflict resolution. This is a
ripoff of Jim's Packless bsddb3 storage. ripoff of Jim's Packless bsddb3 storage.
$Id: TemporaryStorage.py,v 1.1 2003/08/17 20:53:50 chrism Exp $ $Id: TemporaryStorage.py,v 1.2 2003/11/28 16:46:50 jim Exp $
""" """
__version__ ='$Revision: 1.1 $'[11:-2] __version__ ='$Revision: 1.2 $'[11:-2]
from zLOG import LOG, BLATHER from zLOG import LOG, BLATHER
from ZODB.referencesf import referencesf from ZODB.referencesf import referencesf
...@@ -128,10 +128,13 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -128,10 +128,13 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
if self._index.has_key(oid): if self._index.has_key(oid):
oserial=self._index[oid] oserial=self._index[oid]
if serial != oserial: if serial != oserial:
data=self.tryToResolveConflict(oid, oserial, serial, data) rdata = self.tryToResolveConflict(oid, oserial,
if not data: serial, data)
raise POSException.ConflictError(oid=oid, if rdata is None:
serials=(oserial, serial)) raise POSException.ConflictError(
oid=oid, serials=(oserial, serial), data=data)
else:
data = rdata
else: else:
oserial = serial oserial = serial
newserial=self._serial newserial=self._serial
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment