Commit 0b9d06c2 authored by Jeremy Hylton's avatar Jeremy Hylton

Remove unused variable r.

tpc_begin() doesn't return anything anyway.
Rename transaction to txn to make lines shorter.
parent a7e37e12
...@@ -611,7 +611,7 @@ class ClientStorage: ...@@ -611,7 +611,7 @@ class ClientStorage:
self._server.vote(self._serial) self._server.vote(self._serial)
return self._check_serials() return self._check_serials()
def tpc_begin(self, transaction, tid=None, status=' '): def tpc_begin(self, txn, tid=None, status=' '):
"""Storage API: begin a transaction.""" """Storage API: begin a transaction."""
if self._is_read_only: if self._is_read_only:
raise POSException.ReadOnlyError() raise POSException.ReadOnlyError()
...@@ -620,11 +620,11 @@ class ClientStorage: ...@@ -620,11 +620,11 @@ class ClientStorage:
# It is allowable for a client to call two tpc_begins in a # It is allowable for a client to call two tpc_begins in a
# row with the same transaction, and the second of these # row with the same transaction, and the second of these
# must be ignored. # must be ignored.
if self._transaction == transaction: if self._transaction == txn:
self._tpc_cond.release() self._tpc_cond.release()
return return
self._tpc_cond.wait(30) self._tpc_cond.wait(30)
self._transaction = transaction self._transaction = txn
self._tpc_cond.release() self._tpc_cond.release()
if tid is None: if tid is None:
...@@ -635,11 +635,8 @@ class ClientStorage: ...@@ -635,11 +635,8 @@ class ClientStorage:
id = tid id = tid
try: try:
r = self._server.tpc_begin(id, self._server.tpc_begin(id, txn.user, txn.description,
transaction.user, txn._extension, tid, status)
transaction.description,
transaction._extension,
tid, status)
except: except:
# Client may have disconnected during the tpc_begin(). # Client may have disconnected during the tpc_begin().
if self._server is not disconnected_stub: if self._server is not disconnected_stub:
......
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