Author: rhs
Date: Tue Oct 28 20:24:38 2014
New Revision: 1634966

URL: http://svn.apache.org/r1634966
Log:
properly convert NULL data objects

Modified:
    qpid/proton/trunk/proton-c/bindings/python/proton.py

Modified: qpid/proton/trunk/proton-c/bindings/python/proton.py
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/python/proton.py?rev=1634966&r1=1634965&r2=1634966&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/python/proton.py (original)
+++ qpid/proton/trunk/proton-c/bindings/python/proton.py Tue Oct 28 20:24:38 
2014
@@ -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]

Reply via email to