mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-17 23:34:53 +00:00
xrange fix
range to xrange
This commit is contained in:
parent
197f396e16
commit
297a08cd5f
@ -248,6 +248,8 @@ class Pagination(object):
|
||||
def iter_pages(self, left_edge=2, left_current=2,
|
||||
right_current=5, right_edge=2):
|
||||
last = 0
|
||||
if sys.version_info.major >= 3:
|
||||
xrange = range
|
||||
for num in xrange(1, self.pages + 1): # ToDo: can be simplified
|
||||
if num <= left_edge or (num > self.page - left_current - 1 and num < self.page + right_current) \
|
||||
or num > self.pages - right_edge:
|
||||
|
Loading…
Reference in New Issue
Block a user