properly convert NULL data objects git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1634966 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/ca38e6c4 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/ca38e6c4 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/ca38e6c4 Branch: refs/heads/examples Commit: ca38e6c4e787f57b1c4d9fefce8af537adc9007f Parents: f139ae6 Author: Rafael H. Schloming <[email protected]> Authored: Tue Oct 28 20:24:38 2014 +0000 Committer: Rafael H. Schloming <[email protected]> Committed: Tue Oct 28 20:24:38 2014 +0000 ---------------------------------------------------------------------- proton-c/bindings/python/proton.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ca38e6c4/proton-c/bindings/python/proton.py ---------------------------------------------------------------------- diff --git a/proton-c/bindings/python/proton.py b/proton-c/bindings/python/proton.py index 8399952..0ac79d4 100644 --- a/proton-c/bindings/python/proton.py +++ b/proton-c/bindings/python/proton.py @@ -1435,6 +1435,7 @@ class Data: current node sets it _before_ the first node, calling next() will advance to the first node. """ + assert self._data is not None pn_data_rewind(self._data) def next(self): @@ -2242,12 +2243,13 @@ def cond2obj(cond): return None def dat2obj(dimpl): - d = Data(dimpl) - d.rewind() - d.next() - obj = d.get_object() - d.rewind() - return obj + if dimpl: + d = Data(dimpl) + d.rewind() + d.next() + obj = d.get_object() + d.rewind() + return obj def obj2dat(obj, dimpl): if obj is not None: --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
