]> git.decadent.org.uk Git - dak.git/blobdiff - dakweb/queries/madison.py
rmadison: use yield to return content and set correct content type.
[dak.git] / 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)