Commit 87748b15 authored by Jason Madden's avatar Jason Madden

Fix handle_all_serials for the new and old protocols.

parent 45831d69
...@@ -113,18 +113,24 @@ def handle_all_serials(oid, *args): ...@@ -113,18 +113,24 @@ def handle_all_serials(oid, *args):
The original interface just returned the serialno for the The original interface just returned the serialno for the
object. object.
The updated multi-commit API returns nothing from store(), and
returns a sequence of resolved oids from tpc_vote.
""" """
d = {} d = {}
for arg in args: for arg in args:
if isinstance(arg, bytes): if isinstance(arg, bytes):
d[oid] = arg d[oid] = arg
elif arg is None: elif arg:
pass for t in arg:
else: if isinstance(t, bytes):
for oid, serial in arg: # This will be the tid returned by tpc_finish.
if not isinstance(serial, bytes): pass
raise serial # error from ZEO server else:
d[oid] = serial oid, serial = t
if not isinstance(serial, bytes):
raise serial # error from ZEO server
d[oid] = serial
return d return d
def handle_serials(oid, *args): def handle_serials(oid, *args):
......
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