Commit 885b3f37 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

zope4: sortKey should be str in transaction 1.4.1 or later.

parent 545a7c20
...@@ -76,4 +76,4 @@ class ActivityBuffer(TM): ...@@ -76,4 +76,4 @@ class ActivityBuffer(TM):
def sortKey(self, *ignored): def sortKey(self, *ignored):
"""Activities must be finished before databases commit transactions.""" """Activities must be finished before databases commit transactions."""
return -1 return chr(1)
...@@ -66,4 +66,4 @@ InitializeClass(ActivityConnection) ...@@ -66,4 +66,4 @@ InitializeClass(ActivityConnection)
class ActivityDB(DB): class ActivityDB(DB):
_sort_key = (0,) _sort_key = chr(2)
...@@ -70,7 +70,7 @@ class TransactionalVariable(dict): ...@@ -70,7 +70,7 @@ class TransactionalVariable(dict):
_unregistered = True _unregistered = True
def sortKey(self): def sortKey(self):
return None return chr(0)
commit = tpc_vote = tpc_begin = tpc_abort = lambda self, transaction: None commit = tpc_vote = tpc_begin = tpc_abort = lambda self, transaction: None
...@@ -127,7 +127,7 @@ class TransactionalResource(object): ...@@ -127,7 +127,7 @@ class TransactionalResource(object):
return not (args in tv or tv.add(args)) return not (args in tv or tv.add(args))
def sortKey(self): def sortKey(self):
return 1 return chr(1)
abort = commit = tpc_vote = tpc_begin = tpc_finish = tpc_abort = \ abort = commit = tpc_vote = tpc_begin = tpc_finish = tpc_abort = \
lambda self, transaction: None lambda self, transaction: None
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