aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/ordereddict.py4
-rwxr-xr-xscripts/vmstate-static-checker.py4
-rwxr-xr-xtests/image-fuzzer/runner.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/ordereddict.py b/scripts/ordereddict.py
index 2d1d81370b..68ed340b33 100644
--- a/scripts/ordereddict.py
+++ b/scripts/ordereddict.py
@@ -71,9 +71,9 @@ class OrderedDict(dict, DictMixin):
if not self:
raise KeyError('dictionary is empty')
if last:
- key = reversed(self).next()
+ key = next(reversed(self))
else:
- key = iter(self).next()
+ key = next(iter(self))
value = self.pop(key)
return key, value
diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py
index 60d1bf4cda..d3467288dc 100755
--- a/scripts/vmstate-static-checker.py
+++ b/scripts/vmstate-static-checker.py
@@ -158,7 +158,7 @@ def check_fields(src_fields, dest_fields, desc, sec):
while True:
if advance_src:
try:
- s_item = s_iter.next()
+ s_item = next(s_iter)
except StopIteration:
if s_iter_list == []:
break
@@ -173,7 +173,7 @@ def check_fields(src_fields, dest_fields, desc, sec):
if advance_dest:
try:
- d_item = d_iter.next()
+ d_item = next(d_iter)
except StopIteration:
if d_iter_list == []:
# We were not in a substruct
diff --git a/tests/image-fuzzer/runner.py b/tests/image-fuzzer/runner.py
index 8de656933e..45e8fca63f 100755
--- a/tests/image-fuzzer/runner.py
+++ b/tests/image-fuzzer/runner.py
@@ -422,7 +422,7 @@ if __name__ == '__main__':
test_id = count(1)
while should_continue(duration, start_time):
try:
- run_test(str(test_id.next()), seed, work_dir, run_log, cleanup,
+ run_test(str(next(test_id)), seed, work_dir, run_log, cleanup,
log_all, command, config)
except (KeyboardInterrupt, SystemExit):
sys.exit(1)