From c1c328bccadc7e7354e442088ad89a29b4bd63f2 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Thu, 10 Dec 2009 23:35:33 +0000 Subject: [PATCH] Correctly handle lists for SQL queries in get_binary_from_name_suite() Signed-off-by: Luca Falavigna --- dak/examine_package.py | 4 ++-- daklib/dbconn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dak/examine_package.py b/dak/examine_package.py index 15a471cd..ea865ed8 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -306,9 +306,9 @@ def read_changes_or_dsc (suite, filename): def create_depends_string (suite, depends_tree): result = "" if suite == 'experimental': - suite_where = " in ('experimental','unstable')" + suite_where = "in ('experimental','unstable')" else: - suite_where = "'%s'" % suite + suite_where = "= '%s'" % suite comma_count = 1 session = DBConn().session() diff --git a/daklib/dbconn.py b/daklib/dbconn.py index fa9431b2..8d5dd4b5 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -383,7 +383,7 @@ def get_binary_from_name_suite(package, suitename, session=None): AND l.component = c.id AND ba.bin=b.id AND ba.suite = su.id - AND su.suite_name=%(suitename)s + AND su.suite_name %(suitename)s ORDER BY b.version DESC""" return session.execute(sql % {'package': package, 'suitename': suitename}) -- 2.39.5