]> git.decadent.org.uk Git - dak.git/blobdiff - dak/stats.py
Really fix the problem with the mail send to packages-removal twice:
[dak.git] / dak / stats.py
index e3e9077bcbe6ed991eaf0fb32a77b6b879709ba5..bbd58881f0b66883bf71557510b09ec980179d29 100755 (executable)
@@ -34,8 +34,7 @@ import sys
 import apt_pkg
 
 from daklib import utils
-from daklib.dbconn import DBConn, get_suite_architectures, Suite, Architecture, \
-                          BinAssociation
+from daklib.dbconn import DBConn, get_suite_architectures, Suite, Architecture
 
 ################################################################################
 
@@ -112,17 +111,6 @@ def longest(list):
             longest = l
     return longest
 
-def suite_sort(a, b):
-    if Cnf.has_key("Suite::%s::Priority" % (a)):
-        a_priority = int(Cnf["Suite::%s::Priority" % (a)])
-    else:
-        a_priority = 0
-    if Cnf.has_key("Suite::%s::Priority" % (b)):
-        b_priority = int(Cnf["Suite::%s::Priority" % (b)])
-    else:
-        b_priority = 0
-    return cmp(a_priority, b_priority)
-
 def output_format(suite):
     output_suite = []
     for word in suite.split("-"):
@@ -165,7 +153,6 @@ def number_of_packages():
     ## Print the results
     # Setup
     suite_list = suites.values()
-    suite_list.sort(suite_sort)
     suite_id_list = []
     suite_arches = {}
     for suite in suite_list:
@@ -193,7 +180,7 @@ def number_of_packages():
         output = output + arch.center(longest_arch)+" |"
         for suite_id in suite_id_list:
             if suite_arches[suite_id].has_key(arch):
-                count = repr(d[suite_id][arch_id])
+                count = "%d" % d[suite_id][arch_id]
             else:
                 count = "-"
             output = output + count.rjust(longest_suite)+" |"