]> git.decadent.org.uk Git - dak.git/commitdiff
Use the database.init
authorJoerg Jaspert <joerg@debian.org>
Thu, 19 Feb 2009 22:22:39 +0000 (23:22 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 19 Feb 2009 22:22:39 +0000 (23:22 +0100)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/stats.py

index ab2442920b033236987e798d460bb59c00f9773e..849c36b27cb6081265a23db0a9d751f757b11dca 100755 (executable)
@@ -180,7 +180,7 @@ SELECT suite, count(suite) FROM src_associations GROUP BY suite;""")
     for suite in suite_list:
         suite_id = suite_ids[suite]
         suite_arches[suite_id] = {}
-        for arch in database.get_suite_architectures(suite):
+        for arch in database.get_suite_architectures(suite_id):
             suite_arches[suite_id][arch] = ""
         suite_id_list.append(suite_id)
     output_list = [ output_format(i) for i in suite_list ]
@@ -235,6 +235,7 @@ def main ():
     mode = args[0].lower()
 
     projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
+    database.init(Cnf, projectB)
 
     if mode == "arch-space":
         per_arch_space_use()