X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fstats.py;h=f33873475029ff701fdd2509ee57275fbf28b6f6;hb=f601bd71e61c6c265b5fa1f296a5258385e6f154;hp=583178b28a01d89b660dfc15ef67b089b3fd422e;hpb=6f5ec2ece1ad6fbfb9ebc0f55c6fe0a95fa0c89e;p=dak.git diff --git a/dak/stats.py b/dak/stats.py index 583178b2..f3387347 100755 --- a/dak/stats.py +++ b/dak/stats.py @@ -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: @@ -211,9 +198,9 @@ def main (): if not Cnf.has_key("Stats::Options::%s" % (i)): Cnf["Stats::Options::%s" % (i)] = "" - args = apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv) + args = apt_pkg.parse_commandline(Cnf, Arguments, sys.argv) - Options = Cnf.SubTree("Stats::Options") + Options = Cnf.subtree("Stats::Options") if Options["Help"]: usage()