Skip to content

Commit

Permalink
decode if app props val is bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
kashifkhan committed Mar 30, 2023
1 parent 1a39c61 commit 9e17330
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def encode_application_properties(value):
return {TYPE: AMQPTypes.null, VALUE: None}
fields = {TYPE: AMQPTypes.map, VALUE: cast(List, [])}
for key, data in value.items():
cast(List, fields[VALUE]).append(({TYPE: AMQPTypes.string, VALUE: key}, data))
cast(List, fields[VALUE]).append(({TYPE: AMQPTypes.string, VALUE: key}, data.decode("utf-8") if type(data) == bytes else data))
return fields


Expand Down

0 comments on commit 9e17330

Please sign in to comment.