Skip to content

Commit

Permalink
Fix issue: expect redis pubsub data to be str type instead of bytes t…
Browse files Browse the repository at this point in the history
…ype (#196)

**- What I did**

Change redis pubsub expect data type from bytes to str. There was a snmpagent framework change which transfer redis pubsub data from bytes to str, after that change, there is no need for non-framework code to do this transfer. So now we need handle str data directly.

**- How I did it**

Change data expectation from bytes to str

**- How to verify it**

Run regression and manual test
  • Loading branch information
Junchao-Mellanox authored Feb 22, 2021
1 parent 3885f19 commit 183162f
Showing 1 changed file with 1 addition and 1 deletion.
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):
continue

# extract interface name
Expand Down

0 comments on commit 183162f

Please sign in to comment.