Repository: qpid-proton Updated Branches: refs/heads/master c90655b88 -> 76a458f0e
added pydoc for Message.recv; made it robust to getting a link with no delivery Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/76a458f0 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/76a458f0 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/76a458f0 Branch: refs/heads/master Commit: 76a458f0e692e8d8e342459ad4468994d0364ffd Parents: c90655b Author: Rafael Schloming <r...@alum.mit.edu> Authored: Wed Feb 4 13:25:06 2015 -0500 Committer: Rafael Schloming <r...@alum.mit.edu> Committed: Wed Feb 4 13:25:06 2015 -0500 ---------------------------------------------------------------------- proton-c/bindings/python/proton/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/76a458f0/proton-c/bindings/python/proton/__init__.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/proton/__init__.py b/proton-c/bindings/python/proton/__init__.py index 68f7632..b11c5d1 100644 --- a/proton-c/bindings/python/proton/__init__.py +++ b/proton-c/bindings/python/proton/__init__.py @@ -1129,8 +1129,18 @@ The format of the message. return dlv def recv(self, receiver): + """ + Receives and decodes the message content for the current delivery + from the supplied receiver. Upon success it will return the + current delivery for the link. If there is no current delivery, or + if the current delivery is incomplete, it will return None. + + @type receiver: Receiver + @param receiver: the link to receive a message from + @return the delivery associated with the decoded message (or None) + """ dlv = receiver.current - if dlv.partial: return None + if not dlv or dlv.partial: return None encoded = receiver.recv(dlv.pending) # the sender has already forgotten about the delivery, so we might # as well too --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org