]> git.decadent.org.uk Git - dak.git/commitdiff
rmadison: use yield to return content and set correct content type.
authorAnsgar Burchardt <ansgar@debian.org>
Wed, 26 Nov 2014 22:38:32 +0000 (23:38 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Wed, 26 Nov 2014 22:38:40 +0000 (23:38 +0100)
dakweb/queries/madison.py

index 469f9c80d304e10c0c2d7ef614d84e62572023cf..d27d4784864caa1fbf9b2696dfbf1bcbe6d93eba 100644 (file)
@@ -26,6 +26,10 @@ def madison():
     #    kwargs['regex'] = True
 
     result = list_packages(packages, **kwargs)
-    return "\n".join(result) + "\n"
+
+    bottle.response.content_type = 'text/plain'
+    for row in result:
+        yield row
+        yield "\n"
 
 QueryRegister().register_path('/madison', madison)