summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Reports
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-04-12 08:12:17 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-04-12 08:12:17 -0400
commit0cd16d39169d0cab01b7ffe19426d26086500b3e (patch)
tree88f2ae874195528d10aa549e4dc4a0941d55be9f /src/lib/Server/Reports
parent3d353a8bf4ddda9fe6f2df3d384c51633b029def (diff)
downloadbcfg2-0cd16d39169d0cab01b7ffe19426d26086500b3e.tar.gz
bcfg2-0cd16d39169d0cab01b7ffe19426d26086500b3e.tar.bz2
bcfg2-0cd16d39169d0cab01b7ffe19426d26086500b3e.zip
added next() method to Reports BatchFetch iterator for compatibility with pre-3.0 versions of python
Diffstat (limited to 'src/lib/Server/Reports')
-rwxr-xr-xsrc/lib/Server/Reports/utils.py4
1 files changed, 4 insertions, 0 deletions
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"""