From 89e46d87bdc4e1e1b6a8e0e8fd992a4369cf2a49 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 5 Dec 2015 12:42:57 +0000 Subject: [PATCH] fix unicode encoding --- moto/kinesis/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/kinesis/models.py b/moto/kinesis/models.py index e397f922..4de10a55 100644 --- a/moto/kinesis/models.py +++ b/moto/kinesis/models.py @@ -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: