From 7c4864d4ccb40234138043b0aae3356f15eeacf5 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sat, 2 Mar 2013 21:24:18 +0100
Subject: move fetchiter from webapp to dedup.utils

---
 dedup/utils.py | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 dedup/utils.py

(limited to 'dedup')

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()
+
-- 
cgit v1.2.3