fix unicode encoding
This commit is contained in:
parent
b2af81eab5
commit
89e46d87bd
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ class Stream(object):
|
||||||
raise InvalidArgumentError("explicit_hash_key")
|
raise InvalidArgumentError("explicit_hash_key")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
key = int(md5(partition_key).hexdigest(), 16)
|
key = int(md5(partition_key.encode('utf-8')).hexdigest(), 16)
|
||||||
|
|
||||||
for shard in self.shards.values():
|
for shard in self.shards.values():
|
||||||
if shard.starting_hash <= key < shard.ending_hash:
|
if shard.starting_hash <= key < shard.ending_hash:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue