From 696222c7748a2cdfd41e070e19b651e22402b700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 12 Jul 2017 22:30:02 +0200 Subject: [PATCH] Use next built-in instead of next method The next method has been renamed into __next__ in Python 3 (see PEP3114). --- location.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/location.py b/location.py index f00c1406f4..2a442921f2 100644 --- a/location.py +++ b/location.py @@ -205,7 +205,7 @@ class Location(ModelSQL, ModelView): non_empty = set(locations) - set(empty) if non_empty: cls.raise_user_error('inactive_location_with_moves', { - 'location': iter(non_empty).next().rec_name, + 'location': next(iter(non_empty)).rec_name, }) @classmethod