This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
The following commit(s) were added to refs/heads/main by this push:
new d32308291 PROTON-2873: [Python] Fix transaction code for new
disposition API
d32308291 is described below
commit d3230829115e34d3aeb43049f6c75c8176da6f78
Author: Andrew Stitcher <[email protected]>
AuthorDate: Fri Apr 4 18:46:43 2025 -0400
PROTON-2873: [Python] Fix transaction code for new disposition API
---
python/proton/_reactor.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/python/proton/_reactor.py b/python/proton/_reactor.py
index 439bcd882..3b4d71a7d 100644
--- a/python/proton/_reactor.py
+++ b/python/proton/_reactor.py
@@ -34,7 +34,7 @@ from functools import total_ordering
from cproton import PN_ACCEPTED, PN_EVENT_NONE
from ._data import Described, symbol, ulong
-from ._delivery import Delivery, TransactionalDisposition
+from ._delivery import Delivery, Disposition, TransactionalDisposition
from ._endpoints import Connection, Endpoint, Link, Session, Terminus
from ._events import Collector, EventType, EventBase, Event
from ._exceptions import SSLUnavailable
@@ -615,8 +615,8 @@ class Transaction(object):
def handle_outcome(self, event):
if event.delivery == self._declare:
- if event.delivery.remote.data:
- self.id = event.delivery.remote.data[0]
+ if event.delivery.remote_state == Disposition.TRANSACTIONAL_STATE:
+ self.id = event.delivery.remote.id
self.handler.on_transaction_declared(event)
elif event.delivery.remote_state == Delivery.REJECTED:
self.handler.on_transaction_declare_failed(event)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]