From 0cd16d39169d0cab01b7ffe19426d26086500b3e Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 12 Apr 2011 08:12:17 -0400 Subject: added next() method to Reports BatchFetch iterator for compatibility with pre-3.0 versions of python --- src/lib/Server/Reports/utils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/lib/Server/Reports/utils.py b/src/lib/Server/Reports/utils.py index 6010f366b..e0b6ead59 100755 --- a/src/lib/Server/Reports/utils.py +++ b/src/lib/Server/Reports/utils.py @@ -20,6 +20,10 @@ class BatchFetch(object): def __iter__(self): return self + def next(self): + """Provide compatibility with python < 3.0""" + return self.__next__() + def __next__(self): """Return the next object from our array and fetch from the database when needed""" -- cgit v1.2.3-1-g7c22