]> err.no Git - dak/commitdiff
fixup source_exist
authorJoerg Jaspert <joerg@debian.org>
Thu, 17 Feb 2011 19:25:48 +0000 (20:25 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 17 Feb 2011 19:25:48 +0000 (20:25 +0100)
reverse the order of the map check
make it a bit more readable

Signed-off-by: Joerg Jaspert <joerg@debian.org>
daklib/dbconn.py

index 67852949fe35083dededb021e20418292315fa57..e5db1644ced02390ad1cf2fcc8b446151c4f9ae8 100755 (executable)
@@ -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)))