mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 15:48:20 +00:00
python: futurize -f libfuturize.fixes.fix_next_call
Change obj.next() calls to next(obj). This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_next_call $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user