change xrange() to range()
Python 3 doesn't support xrange, so convert all the usage to range.
This is mostly mechanical, but the conversion tripped a few new
warnings with consider-using-enumerate.
BUG=chromium:980619
TEST=lint is unchanged in chromite
TEST=unittests pass
Change-Id: I9f99e323c3d6d993f40b544cabfcc8697d105f47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1689012
Tested-by: Mike Frysinger <vapier@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Reviewed-by: David Burger <dburger@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cros_deps_diff.py b/scripts/cros_deps_diff.py
index a11b057..6b3a19e 100644
--- a/scripts/cros_deps_diff.py
+++ b/scripts/cros_deps_diff.py
@@ -36,7 +36,7 @@
# Generate a color by splicing the bits to generate high contrast colors
index -= len(BASE_COLORS) - 1
chars = [0] * 3
- for bit in xrange(0, 24):
+ for bit in range(0, 24):
chars[bit % 3] |= ((index >> bit) & 0x1) << (7-bit/3)
return "#%02x%02x%02x" % tuple(chars)
@@ -110,7 +110,7 @@
outer_subgraph = graph.AddNewSubgraph('source')
emitted = set()
- for i in xrange(0, len(input_deps)):
+ for i in range(0, len(input_deps)):
try:
pkg_name = version_map[pkg][i]
except KeyError: