Skip to content

[rfc2737] Fix issue: expect redis pubsub data to be str type instead of bytes type #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sonic_ax_impl/mibs/ietf/rfc2737.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def _update_per_namespace_data(self, pubsub):

db_entry = msg["channel"].split(":")[-1]
data = msg['data'] # event data
if not isinstance(data, bytes):
if not isinstance(data, str):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

str [](start = 36, length = 3)

This seems a valid fix. Wondering how it worked before? I think it hit a type runtime error below "set" in data ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was b"set" before.

continue

# extract interface name
Expand Down