diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-04-12 08:12:17 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-04-12 08:12:17 -0400 |
commit | 0cd16d39169d0cab01b7ffe19426d26086500b3e (patch) | |
tree | 88f2ae874195528d10aa549e4dc4a0941d55be9f /src/lib/Server/Reports | |
parent | 3d353a8bf4ddda9fe6f2df3d384c51633b029def (diff) | |
download | bcfg2-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-x | src/lib/Server/Reports/utils.py | 4 |
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""" |