From d24d523c14f5f519e04ea49bbe066323bb795879 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 8 Jun 2018 09:29:45 -0300 Subject: 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 Signed-off-by: Eduardo Habkost Message-Id: <20180608122952.2009-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- scripts/ordereddict.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/ordereddict.py') 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 -- cgit v1.2.3-55-g7522