From 6f0f8e6d39f156d9e3b172e397eb7b7b9bd17bdf Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Sun, 4 May 2008 01:36:01 +0200 Subject: [PATCH] Use "import daklib.foo as foo" style --- ChangeLog | 1 + dak/compare_suites.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) mode change 100644 => 100755 dak/compare_suites.py diff --git a/ChangeLog b/ChangeLog index 55da6678..ff8cecb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ * dak/clean_proposed_updates.py: likewise * dak/clean_queues.py: likewise * dak/clean_suites.py: likewise + * dak/compare_suites.py: likewise * dak/check_archive.py (check_files_not_symlinks): Remove long-time unused and commented code. Import stuff from daklib as diff --git a/dak/compare_suites.py b/dak/compare_suites.py old mode 100644 new mode 100755 index e94d9f5f..a3df8298 --- a/dak/compare_suites.py +++ b/dak/compare_suites.py @@ -22,8 +22,8 @@ import pg, sys import apt_pkg -import daklib.database -import daklib.utils +import daklib.database as database +import daklib.utils as utils ################################################################################ @@ -44,7 +44,7 @@ Looks for fixable descrepancies between stable and unstable. def main (): global Cnf, projectB - Cnf = daklib.utils.get_conf() + Cnf = utils.get_conf() Arguments = [('h',"help","Compare-Suites::Options::Help")] for i in [ "help" ]: if not Cnf.has_key("Compare-Suites::Options::%s" % (i)): @@ -57,15 +57,15 @@ def main (): usage() projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])) - daklib.database.init(Cnf, projectB) + database.init(Cnf, projectB) src_suite = "stable" dst_suite = "unstable" - src_suite_id = daklib.database.get_suite_id(src_suite) - dst_suite_id = daklib.database.get_suite_id(dst_suite) - arch_all_id = daklib.database.get_architecture_id("all") - dsc_type_id = daklib.database.get_override_type_id("dsc") + src_suite_id = database.get_suite_id(src_suite) + dst_suite_id = database.get_suite_id(dst_suite) + arch_all_id = database.get_architecture_id("all") + dsc_type_id = database.get_override_type_id("dsc") for arch in Cnf.ValueList("Suite::%s::Architectures" % (src_suite)): if arch == "source": @@ -77,7 +77,7 @@ def main (): if arch == "all": continue - arch_id = daklib.database.get_architecture_id(arch) + arch_id = database.get_architecture_id(arch) q = projectB.query(""" SELECT b_src.package, b_src.version, a.arch_string FROM binaries b_src, bin_associations ba, override o, architecture a -- 2.39.5