summaryrefslogtreecommitdiff
path: root/dedup/utils.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-03-02 21:24:18 +0100
committerHelmut Grohne <helmut@subdivi.de>2013-03-02 21:24:18 +0100
commit7c4864d4ccb40234138043b0aae3356f15eeacf5 (patch)
treeb99331e851bf03a071ae9bcce5fbdba4a6bd561a /dedup/utils.py
parentaada0b97321a336a841385923145e1854fb36860 (diff)
downloaddebian-dedup-7c4864d4ccb40234138043b0aae3356f15eeacf5.tar.gz
move fetchiter from webapp to dedup.utils
Diffstat (limited to 'dedup/utils.py')
-rw-r--r--dedup/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/dedup/utils.py b/dedup/utils.py
new file mode 100644
index 0000000..2fae9fd
--- /dev/null
+++ b/dedup/utils.py
@@ -0,0 +1,7 @@
+def fetchiter(cursor):
+ rows = cursor.fetchmany()
+ while rows:
+ for row in rows:
+ yield row
+ rows = cursor.fetchmany()
+