From a389fdcd95be945e6cc876723422b5b3b0b3273a Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Sun, 6 Oct 2019 15:24:37 +0100 Subject: [PATCH] #1874 - Adjust for Python2/3 incompatibilities --- moto/dynamodb2/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index b97cd94e7..9b0e74a1d 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -153,7 +153,7 @@ class LimitedSizeDict(dict): self.update(*args, **kwargs) def __setitem__(self, key, value): - current_item_size = sum([item.size() if type(item) == DynamoType else bytesize(str(item)) for item in (self.keys() + self.values())]) + current_item_size = sum([item.size() if type(item) == DynamoType else bytesize(str(item)) for item in (list(self.keys()) + list(self.values()))]) new_item_size = bytesize(key) + (value.size() if type(value) == DynamoType else bytesize(str(value))) # Official limit is set to 400000 (400KB) # Manual testing confirms that the actual limit is between 409 and 410KB