Repository: qpid-proton Updated Branches: refs/heads/master 0a2cdb980 -> dcec9ff06
Change syntax to something older versions of python understand Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/93095ed7 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/93095ed7 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/93095ed7 Branch: refs/heads/master Commit: 93095ed754acda54e049aab04face81f7cf0743d Parents: 0a2cdb9 Author: Gordon Sim <[email protected]> Authored: Thu Jan 29 10:50:30 2015 +0000 Committer: Gordon Sim <[email protected]> Committed: Thu Jan 29 19:36:26 2015 +0000 ---------------------------------------------------------------------- proton-c/bindings/python/proton/reactors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/93095ed7/proton-c/bindings/python/proton/reactors.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/proton/reactors.py b/proton-c/bindings/python/proton/reactors.py index 1d3d644..c5eddd9 100644 --- a/proton-c/bindings/python/proton/reactors.py +++ b/proton-c/bindings/python/proton/reactors.py @@ -640,7 +640,9 @@ class Connector(Handler): def _connect(self, connection): host, port = connection.address.next() logging.info("connecting to %s:%i" % (host, port)) - heartbeat = connection.heartbeat if hasattr(connection, 'heartbeat') else None + heartbeat = None + if hasattr(connection, 'heartbeat'): + heartbeat = connection.heartbeat self.loop.add(AmqpSocket(connection, socket.socket(), self.loop.events, heartbeat=heartbeat).connect(host, port)) connection._pin = None #connection is now referenced by AmqpSocket, so no need for circular reference --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
