From: Joerg Jaspert Date: Thu, 17 Feb 2011 19:25:48 +0000 (+0100) Subject: fixup source_exist X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0964201c18c15951001d468ed4a8ed5d5960aa17;p=dak fixup source_exist reverse the order of the map check make it a bit more readable Signed-off-by: Joerg Jaspert --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 67852949..e5db1644 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2277,9 +2277,9 @@ def source_exists(source, source_version, suites = ["any"], session=None): maps = [ (x[1], x[2]) for x in maps if x[0] == "map" or x[0] == "silent-map" ] s = [suite] - for x in maps: - if x[1] in s and x[0] not in s: - s.append(x[0]) + for (from_, to) in maps: + if from_ in s and to not in s: + s.append(to) q = q.filter(DBSource.suites.any(Suite.suite_name.in_(s)))