This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git

commit 70fb2d4a84e999aa1838d03d584716568a25f1fa
Author: Andrew Stitcher <astitc...@apache.org>
AuthorDate: Thu Jul 25 16:02:39 2024 -0400

    PROTON-2838: [Python] Treat empty list custom disposition as None
    
    Custom dispositions would be more consistently represented as empty
    lists rather than null: The only current use for descriptors is to
    describe lists.
---
 python/proton/_delivery.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/proton/_delivery.py b/python/proton/_delivery.py
index e47d99ad7..bdfd42b37 100644
--- a/python/proton/_delivery.py
+++ b/python/proton/_delivery.py
@@ -188,7 +188,8 @@ class Disposition(object):
         if self.local:
             return self._data
         else:
-            return dat2obj(pn_disposition_data(self._impl))
+            r = dat2obj(pn_disposition_data(self._impl))
+            return r if r != [] else None
 
     @data.setter
     def data(self, obj: List[int]) -> None:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to