From c52e9215b2bd96b7583bf8ed7a945b74dcfd2173 Mon Sep 17 00:00:00 2001 From: Dmitry Zv Date: Wed, 16 Mar 2016 16:17:41 -0600 Subject: [PATCH] Fixed gen() doesn't have len() error. --- 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 4dcb367e8..ba4bbaf6f 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -369,7 +369,7 @@ class Table(object): if scan_index_forward is False: results.reverse() - scanned_count = len(self.all_items()) + scanned_count = len(list(self.all_items())) results, last_evaluated_key = self._trim_results(results, limit, exclusive_start_key)