Skip to content

Commit

Permalink
PROTON-2838: [Python] Treat empty list custom disposition as None
Browse files Browse the repository at this point in the history
Custom dispositions would be more consistently represented as empty
lists rather than null: The only current use for descriptors is to
describe lists.
  • Loading branch information
astitcher committed Jul 26, 2024
1 parent f0d3184 commit 70fb2d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/proton/_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def data(self) -> Optional[List[int]]:
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:
Expand Down

0 comments on commit 70fb2d4

Please sign in to comment.