X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fstats.py;h=20a02b55cac3c0d4345efe5f8d4017ed5a2f02e2;hb=8ecb9ff76c84bb82f9289b03ce79aaa939ea2d82;hp=0f1629e6947760c26d7953a42c71af6bf20c1a99;hpb=fb950358e821c33028c02b872396cd1d1bd7402a;p=dak.git diff --git a/dak/stats.py b/dak/stats.py old mode 100644 new mode 100755 index 0f1629e6..20a02b55 --- a/dak/stats.py +++ b/dak/stats.py @@ -32,7 +32,7 @@ import pg, sys import apt_pkg -import daklib.utils +from daklib import utils ################################################################################ @@ -71,7 +71,7 @@ SELECT a.arch_string as Architecture, sum(f.size) def daily_install_stats(): stats = {} - f = daklib.utils.open_file("2001-11") + f = utils.open_file("2001-11") for line in f.readlines(): split = line.strip().split('|') program = split[1] @@ -213,7 +213,7 @@ SELECT suite, count(suite) FROM src_associations GROUP BY suite;""") def main (): global Cnf, projectB - Cnf = daklib.utils.get_conf() + Cnf = utils.get_conf() Arguments = [('h',"help","Stats::Options::Help")] for i in [ "help" ]: if not Cnf.has_key("Stats::Options::%s" % (i)): @@ -226,10 +226,10 @@ def main (): usage() if len(args) < 1: - daklib.utils.warn("dak stats requires a MODE argument") + utils.warn("dak stats requires a MODE argument") usage(1) elif len(args) > 1: - daklib.utils.warn("dak stats accepts only one MODE argument") + utils.warn("dak stats accepts only one MODE argument") usage(1) mode = args[0].lower() @@ -242,7 +242,7 @@ def main (): elif mode == "daily-install": daily_install_stats() else: - daklib.utils.warn("unknown mode '%s'" % (mode)) + utils.warn("unknown mode '%s'" % (mode)) usage(1) ################################################################################