From 005ea9dcb3b59afe5ed4fafbed3f0d1a6c3353ac Mon Sep 17 00:00:00 2001 From: madhu Date: Tue, 15 Jan 2019 03:24:22 +0000 Subject: [PATCH] Fix configdb.py TypeError exception by adding PY3K check (#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))