You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2014/11/14 12:03:39 UTC
[30/50] [abbrv] qpid-proton git commit: properly convert NULL data
objects
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 <rh...@apache.org>
Authored: Tue Oct 28 20:24:38 2014 +0000
Committer: Rafael H. Schloming <rh...@apache.org>
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: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org