mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06: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:
parent
068cf7a44c
commit
d24d523c14
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue