From: Ansgar Burchardt Date: Wed, 26 Nov 2014 22:38:32 +0000 (+0100) Subject: rmadison: use yield to return content and set correct content type. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=707f0c5652b550fefd53e55bc2cbd3d2b8ef088e;p=dak.git rmadison: use yield to return content and set correct content type. --- 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)