[dak/master] rmadison: use yield to return content and set correct content type.
---
dakweb/queries/madison.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dakweb/queries/madison.py b/dakweb/queries/madison.py
index 469f9c8..d27d478 100644
--- a/dakweb/queries/madison.py
+++ b/dakweb/queries/madison.py
@@ -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)
--
1.7.10.4
Reply to: