Use next built-in instead of next method

The next method has been renamed into __next__ in Python 3 (see PEP3114).
This commit is contained in:
Cédric Krier
2017-07-12 22:30:02 +02:00
parent 4356a58019
commit 696222c774
+1 -1
View File
@@ -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