Commit 0fa3183f authored by Aurel's avatar Aurel

undo acto like store so no need to lock transaction here


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@195 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 1e1b0263
......@@ -6,6 +6,7 @@ import logging
from neo.client.dispatcher import Dispatcher
from neo.event import EventManager
from neo.util import dump
class NEOStorageError(POSException.StorageError):
pass
......@@ -148,15 +149,12 @@ class Storage(BaseStorage.BaseStorage,
def undo(self, transaction_id, txn):
if self._is_read_only:
raise POSException.ReadOnlyError()
self._txn_lock_acquire()
try:
try:
return self.app.undo(transaction_id = transaction_id,
txn = txn, wrapper = self)
except NEOStorageConflictError:
raise POSException.ConflictError
finally:
self._txn_lock_release()
return self.app.undo(transaction_id = transaction_id,
txn = txn, wrapper = self)
except NEOStorageConflictError:
raise POSException.ConflictError
def undoLog(self, first, last, filter):
if self._is_read_only:
......
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