Skip to content

Commit

Permalink
Fix configdb.py TypeError exception by checking PY3K (sonic-net#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhupalu committed Jan 15, 2019
1 parent fa26e06 commit 4d4103a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/swsssdk/configdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4d4103a

Please sign in to comment.