From 77877a39ef752adb77790b4c777c73bc6496601d Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 27 Feb 2015 02:43:48 +0100 Subject: reproducible: notes: format the query before calling it in load_notes(). this is to have a useful error message, in case of errors --- bin/reproducible_html_notes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_html_notes.py') diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 313846f4..1f047130 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -152,8 +152,9 @@ def load_notes(): try: # actually have been tested query = 'SELECT s.name ' + \ 'FROM results AS r JOIN sources AS s ON r.package_id=s.id ' + \ - 'WHERE s.name="{pkg}" AND r.status != ""' - result = query_db(query.format(pkg=package))[0] + 'WHERE s.name="{pkg}" AND r.status != "" AND s.suite="sid"' + query = query.format(pkg=package) + result = query_db(query)[0] except IndexError: print_critical_message('This query produces no results: ' + query + '\nThis means there is no tested package with the name ' + -- cgit v1.2.3-54-g00ecf