fix unicode encoding

This commit is contained in:
root 2015-12-05 12:42:57 +00:00
parent b2af81eab5
commit 89e46d87bd

View File

@ -143,7 +143,7 @@ class Stream(object):
raise InvalidArgumentError("explicit_hash_key")
else:
key = int(md5(partition_key).hexdigest(), 16)
key = int(md5(partition_key.encode('utf-8')).hexdigest(), 16)
for shard in self.shards.values():
if shard.starting_hash <= key < shard.ending_hash: