Repository: qpid-proton Updated Branches: refs/heads/master de7ef15b0 -> 669b70fff
PROTON-1231: python BlockingConnection hides disconnect error info Added the transport.condition error to the exception thrown on disconnect. Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/669b70ff Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/669b70ff Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/669b70ff Branch: refs/heads/master Commit: 669b70fff76a32b1285b6cbadbf27f9e6d595211 Parents: de7ef15 Author: Alan Conway <[email protected]> Authored: Thu Jun 9 15:47:04 2016 -0400 Committer: Alan Conway <[email protected]> Committed: Thu Jun 9 15:47:04 2016 -0400 ---------------------------------------------------------------------- proton-c/bindings/python/proton/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/669b70ff/proton-c/bindings/python/proton/utils.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py index c0fdd12..9cd7cf3 100644 --- a/proton-c/bindings/python/proton/utils.py +++ b/proton-c/bindings/python/proton/utils.py @@ -261,7 +261,8 @@ class BlockingConnection(Handler): self.container.stop() self.conn.handler = None # break cyclical reference if self.disconnected and not self._is_closed(): - raise ConnectionException("Connection %s disconnected" % self.url) + raise ConnectionException( + "Connection %s disconnected: %s" % (self.url, self.disconnected)) def on_link_remote_close(self, event): if event.link.state & Endpoint.LOCAL_ACTIVE: @@ -280,7 +281,7 @@ class BlockingConnection(Handler): self.on_transport_closed(event) def on_transport_closed(self, event): - self.disconnected = True + self.disconnected = event.transport.condition or "unknown" class AtomicCount(object): def __init__(self, start=0, step=1): --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
