From 183162fcc468b3af774be2353b84bdf0b8365b46 Mon Sep 17 00:00:00 2001 From: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com> Date: Mon, 22 Feb 2021 09:47:34 +0800 Subject: [PATCH] Fix issue: expect redis pubsub data to be str type instead of bytes type (#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 --- src/sonic_ax_impl/mibs/ietf/rfc2737.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic_ax_impl/mibs/ietf/rfc2737.py b/src/sonic_ax_impl/mibs/ietf/rfc2737.py index b0aa7fa9add2..dc63f4c9a7bf 100644 --- a/src/sonic_ax_impl/mibs/ietf/rfc2737.py +++ b/src/sonic_ax_impl/mibs/ietf/rfc2737.py @@ -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