From 707f0c5652b550fefd53e55bc2cbd3d2b8ef088e Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Wed, 26 Nov 2014 23:38:32 +0100 Subject: [PATCH] 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 469f9c80..d27d4784 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) -- 2.39.2