Skip to content

Commit

Permalink
fix(python-cient): python3 pass str value but not bytes (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 authored May 25, 2022
1 parent cedb819 commit d6027a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python-client/pypegasus/pgclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def multi_set(self, hash_key, sortkey_value_dict, ttl=0, timeout=0):
partition_hash = self.table.get_hashkey_hash(hash_key)
peer_gpid = self.table.get_gpid_by_hash(partition_hash)
session = self.table.get_session(peer_gpid)
kvs = [key_value(blob(str(k)), blob(str(v))) for k, v in sortkey_value_dict.items()]
kvs = [key_value(blob(k), blob(v)) for k, v in sortkey_value_dict.items()]
ttl = get_ttl(ttl)
req = multi_put_request(blob(hash_key), kvs, ttl)
op = RrdbMultiPutOperator(peer_gpid, req, partition_hash)
Expand Down Expand Up @@ -881,7 +881,7 @@ def multi_get(self, hash_key,
if sortkey_set is None:
pass
elif isinstance(sortkey_set, set):
ks = [blob(str(k)) for k in sortkey_set]
ks = [blob(k) for k in sortkey_set]
else:
return error_types.ERR_INVALID_PARAMETERS.value, 0

Expand Down Expand Up @@ -976,7 +976,7 @@ def multi_del(self, hash_key, sortkey_set, timeout=0):
session = self.table.get_session(peer_gpid)
ks = []
if isinstance(sortkey_set, set):
ks = [blob(str(k)) for k in sortkey_set]
ks = [blob(k) for k in sortkey_set]
else:
return error_types.ERR_INVALID_PARAMETERS.value, 0

Expand Down

0 comments on commit d6027a4

Please sign in to comment.