From 9b078292ff8018b7006507b921209d0eb3d03722 Mon Sep 17 00:00:00 2001 From: madhu Pal Date: Fri, 18 Jan 2019 05:37:29 +0000 Subject: [PATCH] [configdb]: Fixed TypeErrorException when get_config with python3 #44 --- src/swsssdk/configdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/swsssdk/configdb.py b/src/swsssdk/configdb.py index e255979aa..f2626f2d1 100644 --- a/src/swsssdk/configdb.py +++ b/src/swsssdk/configdb.py @@ -280,6 +280,8 @@ def get_config(self): keys = client.keys('*') data = {} for key in keys: + if PY3K: + key = key.decode('utf-8') try: (table_name, row) = key.split(self.TABLE_NAME_SEPARATOR, 1) entry = self.__raw_to_typed(client.hgetall(key))