From 5a239cb7b8b76ae1aec8df08505b3f146f0867df Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 2 Jun 2014 21:03:56 +0300 Subject: [PATCH] Use six.moves.zip instead of itertools.izip. --- mediagoblin/tools/pagination.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mediagoblin/tools/pagination.py b/mediagoblin/tools/pagination.py index 855878e0..a525caf7 100644 --- a/mediagoblin/tools/pagination.py +++ b/mediagoblin/tools/pagination.py @@ -17,9 +17,11 @@ import urllib import copy from math import ceil, floor -from itertools import izip, count +from itertools import count from werkzeug.datastructures import MultiDict +from six.moves import zip + PAGINATION_DEFAULT_PER_PAGE = 30 @@ -52,7 +54,7 @@ class Pagination(object): if jump_to_id: cursor = copy.copy(self.cursor) - for (doc, increment) in izip(cursor, count(0)): + for (doc, increment) in list(zip(cursor, count(0))): if doc.id == jump_to_id: self.page = 1 + int(floor(increment / self.per_page)) -- 2.25.1