Skip to content

Commit

Permalink
send data to server as bytes
Browse files Browse the repository at this point in the history
This is a bit of a punt, especially WRT extended info.  For regular
ZEO servers, FileStorage is going to want to pickle extended info, but
byteserver can't pickle extended info. I'm not sure how best to resolve this.
  • Loading branch information
Jim Fulton committed Oct 21, 2016
1 parent c8bbe82 commit 7b56ed3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ZEO/ClientStorage.py
Expand Up @@ -793,7 +793,7 @@ def tpc_vote(self, txn):
def tpc_transaction(self):
return self._transaction

def tpc_begin(self, txn, tid=None, status=' '):
def tpc_begin(self, txn, tid=None, status=b' '):
"""Storage API: begin a transaction."""
if self._is_read_only:
raise POSException.ReadOnlyError()
Expand Down Expand Up @@ -823,7 +823,10 @@ def tpc_begin(self, txn, tid=None, status=' '):
try:
self._async(
'tpc_begin', id(txn),
txn.user, txn.description, txn._extension, tid, status)
txn.user.encode('utf-8'),
txn.description.encode('utf-8'),
b'', # TODO: deal with extension info
tid, status)
except ClientDisconnected:
self.tpc_end(txn)
raise
Expand Down

0 comments on commit 7b56ed3

Please sign in to comment.