python: Replace xrange with range

In Py2 `range` returns a list and `xrange` creates a sequence object
that evaluates lazily. In Py3 `range` is equivalent to `xrange` in Py2.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Radostin Stoyanov 2018-09-23 15:31:54 +01:00 committed by Andrei Vagin
parent 7064cbaa35
commit c36b5dab05
3 changed files with 7 additions and 7 deletions

View file

@ -625,7 +625,7 @@ class coredump_generator:
off = 0# in pages
for m in pagemap[1:]:
found = False
for i in xrange(m["nr_pages"]):
for i in range(m["nr_pages"]):
if m["vaddr"] + i*PAGESIZE == page_no*PAGESIZE:
found = True
break