[oe-commits] [openembedded-core] 18/20: python3: rename xrange -> range
git at git.openembedded.org
git at git.openembedded.org
Wed Jun 1 11:48:26 UTC 2016
rpurdie pushed a commit to branch python3
in repository openembedded-core.
commit df62315984cefc6ed6cbda0e5bc81ebfdbc65aac
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Fri May 20 11:47:03 2016 +0300
python3: rename xrange -> range
Renamed xrange to range as there xrange doesn't exist in python 3:
https://docs.python.org/3.0/whatsnew/3.0.html#views-and-iterators-instead-of-lists
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +-
scripts/lib/devtool/standard.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index e2280e4..0e2b105 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -324,7 +324,7 @@ def run_cyclictest_suite():
t = time.time()
max_list = []
- for i in xrange(0, suite_size):
+ for i in range(0, suite_size):
tmp_min, tmp_avg, tmp_max = run_cyclictest_once()
msg = "%2d/%2d:" % (i+1, suite_size)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index e5bdf2f..a8349fe 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -837,7 +837,7 @@ def _get_patchset_revs(args, srctree, recipe_path):
stdout, _ = bb.process.run('git rev-list --reverse %s..HEAD' %
initial_rev, cwd=srctree)
newcommits = stdout.split()
- for i in xrange(min(len(commits), len(newcommits))):
+ for i in range(min(len(commits), len(newcommits))):
if newcommits[i] == commits[i]:
update_rev = commits[i]
@@ -863,7 +863,7 @@ def _remove_file_entries(srcuri, filelist):
entries = []
for fname in filelist:
basename = os.path.basename(fname)
- for i in xrange(len(srcuri)):
+ for i in range(len(srcuri)):
if (srcuri[i].startswith('file://') and
os.path.basename(srcuri[i].split(';')[0]) == basename):
entries.append(srcuri[i])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list