aboutsummaryrefslogtreecommitdiff
path: root/test/py/u_boot_console_sandbox.py
diff options
context:
space:
mode:
authorPaul Burton2017-09-14 14:34:44 -0700
committerSimon Glass2018-07-10 14:50:50 -0600
commitb8c455500a08c75c4809e523d348027e72cda7ec (patch)
tree2ed0c97c155bd3e8b342034fe3031019b9d7c051 /test/py/u_boot_console_sandbox.py
parentdffd56d1d270e4797e43272a6c9000b8b8aeaf29 (diff)
test/py: Use range() rather than xrange()
In python 3.x the xrange() function has been removed, and range() returns an iterator much like Python 2.x's xrange(). Simply use range() in place of xrange() in order to work on both python 2.x & 3.x. This will mean a small cost on python 2.x since range() will return a list there rather than an iterator, but the cost should be negligible. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test/py/u_boot_console_sandbox.py')
-rw-r--r--test/py/u_boot_console_sandbox.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/u_boot_console_sandbox.py b/test/py/u_boot_console_sandbox.py
index c901397e1c1..778f6d0983d 100644
--- a/test/py/u_boot_console_sandbox.py
+++ b/test/py/u_boot_console_sandbox.py
@@ -81,7 +81,7 @@ class ConsoleSandbox(ConsoleBase):
p = self.p
self.p = None
- for i in xrange(100):
+ for i in range(100):
ret = not p.isalive()
if ret:
break