Skip to content

Commit

Permalink
Force key/value convertion to str before send to redis lib (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
taoyl-ms authored and lguohan committed Nov 18, 2018
1 parent 7ce52d8 commit 8113744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swsssdk/configdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ def __typed_to_raw(self, typed_data):
if type(value) is list:
raw_data[key+'@'] = ','.join(value)
else:
raw_data[key] = value
raw_data[key] = str(value)
return raw_data

@staticmethod
def serialize_key(key):
if type(key) is tuple:
return ConfigDBConnector.KEY_SEPARATOR.join(key)
else:
return key
return str(key)

@staticmethod
def deserialize_key(key):
Expand Down

0 comments on commit 8113744

Please sign in to comment.