]> err.no Git - dak/commitdiff
Correctly handle lists for SQL queries in get_binary_from_name_suite()
authorLuca Falavigna <dktrkranz@debian.org>
Thu, 10 Dec 2009 23:35:33 +0000 (23:35 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Thu, 10 Dec 2009 23:35:33 +0000 (23:35 +0000)
Signed-off-by: Luca Falavigna <dktrkranz@debian.org>
dak/examine_package.py
daklib/dbconn.py

index 15a471cd231a2ef7168c723b81195d08b942a9e1..ea865ed839f38e44ee5726351e38fffcf47439d6 100755 (executable)
@@ -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()
index fa9431b23b2d1c696752b5faa443553b5cc695bd..8d5dd4b574068d84283050347342612600566747 100644 (file)
@@ -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})