summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp.py')
-rwxr-xr-xwebapp.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/webapp.py b/webapp.py
index dd1f99a..4a586dd 100755
--- a/webapp.py
+++ b/webapp.py
@@ -9,6 +9,8 @@ from werkzeug.exceptions import HTTPException, NotFound
from werkzeug.routing import Map, Rule, RequestRedirect
from werkzeug.wrappers import Request, Response
+from dedup.utils import fetchiter
+
hash_functions = [
("sha512", "sha512"),
("image_sha512", "image_sha512"),
@@ -140,13 +142,6 @@ index_template = jinjaenv.from_string(
</ul>
{% endblock %}""")
-def fetchiter(cursor):
- rows = cursor.fetchmany()
- while rows:
- for row in rows:
- yield row
- rows = cursor.fetchmany()
-
def encode_and_buffer(iterator):
buff = b""
for elem in iterator: