From: Mark Hymers Date: Mon, 5 May 2008 19:32:00 +0000 (+0100) Subject: let's use pythonesque imports, shall we? X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e60420c69a993a4041c22008dafc2fcb238d0d5;p=dak let's use pythonesque imports, shall we? --- diff --git a/dak/check_archive.py b/dak/check_archive.py index 7a2c779c..2d9321d6 100755 --- a/dak/check_archive.py +++ b/dak/check_archive.py @@ -28,8 +28,8 @@ import commands, os, pg, stat, sys, time import apt_pkg, apt_inst -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/check_overrides.py b/dak/check_overrides.py index cdab6449..2a576b58 100644 --- a/dak/check_overrides.py +++ b/dak/check_overrides.py @@ -50,9 +50,9 @@ import pg, sys, os import apt_pkg -import daklib.database as database -import daklib.logging as logging -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import utils ################################################################################ diff --git a/dak/check_proposed_updates.py b/dak/check_proposed_updates.py index a4e7c0cb..afb0faae 100755 --- a/dak/check_proposed_updates.py +++ b/dak/check_proposed_updates.py @@ -30,8 +30,8 @@ import pg, sys, os import apt_pkg, apt_inst -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/clean_proposed_updates.py b/dak/clean_proposed_updates.py index fc063ddb..3dd6e6f3 100755 --- a/dak/clean_proposed_updates.py +++ b/dak/clean_proposed_updates.py @@ -21,8 +21,8 @@ import os, pg, re, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/clean_queues.py b/dak/clean_queues.py index 30e0baf1..9f771b72 100755 --- a/dak/clean_queues.py +++ b/dak/clean_queues.py @@ -35,7 +35,7 @@ import os, stat, sys, time import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/clean_suites.py b/dak/clean_suites.py index f459cdda..fc4b8473 100755 --- a/dak/clean_suites.py +++ b/dak/clean_suites.py @@ -30,7 +30,7 @@ import os, pg, stat, sys, time import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/compare_suites.py b/dak/compare_suites.py index a3df8298..8c367582 100755 --- a/dak/compare_suites.py +++ b/dak/compare_suites.py @@ -22,8 +22,8 @@ import pg, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/control_overrides.py b/dak/control_overrides.py index 9ea1cd60..0af5c48b 100644 --- a/dak/control_overrides.py +++ b/dak/control_overrides.py @@ -51,9 +51,9 @@ import pg, sys, time import apt_pkg -import daklib.utils as utils -import daklib.database as database -import daklib.logging as logging +from daklib import utils +from daklib import database +from daklib import logging ################################################################################ diff --git a/dak/control_suite.py b/dak/control_suite.py index 63a0386b..4cb5bd38 100644 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -43,9 +43,9 @@ import pg, sys import apt_pkg -import daklib.database as database -import daklib.logging as logging -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import utils ####################################################################################### diff --git a/dak/cruft_report.py b/dak/cruft_report.py index cc5aa4b8..6837ebf7 100755 --- a/dak/cruft_report.py +++ b/dak/cruft_report.py @@ -29,8 +29,8 @@ import commands, pg, os, sys, time import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/decode_dot_dak.py b/dak/decode_dot_dak.py index d4373641..00bf8e7d 100644 --- a/dak/decode_dot_dak.py +++ b/dak/decode_dot_dak.py @@ -28,8 +28,8 @@ import sys import apt_pkg -import daklib.queue as queue -import daklib.utils as utils +from daklib import queue +from daklib import utils ################################################################################ diff --git a/dak/examine_package.py b/dak/examine_package.py index 81191d25..ae3ec6c9 100755 --- a/dak/examine_package.py +++ b/dak/examine_package.py @@ -34,8 +34,8 @@ import errno, os, pg, re, sys, md5 import apt_pkg, apt_inst -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/find_null_maintainers.py b/dak/find_null_maintainers.py index c4e457f1..652edfd2 100755 --- a/dak/find_null_maintainers.py +++ b/dak/find_null_maintainers.py @@ -21,7 +21,7 @@ import ldap, pg, sys, time import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/generate_index_diffs.py b/dak/generate_index_diffs.py index 7cbedb9c..286c1eba 100755 --- a/dak/generate_index_diffs.py +++ b/dak/generate_index_diffs.py @@ -32,7 +32,7 @@ import sys, os, tempfile import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/generate_releases.py b/dak/generate_releases.py index afd4a02b..c9dece83 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -24,7 +24,7 @@ import sys, os, popen2, tempfile, stat, time, pg import apt_pkg -import daklib.utils as utils +from daklib import utils from daklib.dak_exceptions import * ################################################################################ diff --git a/dak/import_archive.py b/dak/import_archive.py index b1e11fce..203221be 100755 --- a/dak/import_archive.py +++ b/dak/import_archive.py @@ -38,8 +38,8 @@ import commands, os, pg, re, sys, time import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils from daklib.dak_exceptions import * ############################################################################### diff --git a/dak/import_keyring.py b/dak/import_keyring.py index 6d91b460..a70a2e78 100755 --- a/dak/import_keyring.py +++ b/dak/import_keyring.py @@ -19,8 +19,8 @@ ################################################################################ -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils import sys, os, re import apt_pkg, pg, ldap, email.Utils diff --git a/dak/import_ldap_fingerprints.py b/dak/import_ldap_fingerprints.py index 85cd7a22..b5682853 100755 --- a/dak/import_ldap_fingerprints.py +++ b/dak/import_ldap_fingerprints.py @@ -46,8 +46,8 @@ import commands, ldap, pg, re, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/import_users_from_passwd.py b/dak/import_users_from_passwd.py index af9d1239..b182f604 100755 --- a/dak/import_users_from_passwd.py +++ b/dak/import_users_from_passwd.py @@ -31,7 +31,7 @@ import pg, pwd, sys import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/init_db.py b/dak/init_db.py index 16a8d8ba..d40ad0c0 100755 --- a/dak/init_db.py +++ b/dak/init_db.py @@ -21,8 +21,8 @@ import pg, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/init_dirs.py b/dak/init_dirs.py index f92515e2..d095eeee 100755 --- a/dak/init_dirs.py +++ b/dak/init_dirs.py @@ -21,7 +21,7 @@ import os, sys import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/ls.py b/dak/ls.py index 2b445d82..baf13733 100755 --- a/dak/ls.py +++ b/dak/ls.py @@ -28,8 +28,8 @@ import os, pg, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/make_maintainers.py b/dak/make_maintainers.py index c3905af9..090b8d43 100755 --- a/dak/make_maintainers.py +++ b/dak/make_maintainers.py @@ -27,8 +27,8 @@ import pg, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/make_overrides.py b/dak/make_overrides.py index 77e7bb8c..1087ce28 100755 --- a/dak/make_overrides.py +++ b/dak/make_overrides.py @@ -27,8 +27,8 @@ import pg, sys import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/make_suite_file_list.py b/dak/make_suite_file_list.py index ca4e0363..7d10d42b 100755 --- a/dak/make_suite_file_list.py +++ b/dak/make_suite_file_list.py @@ -36,9 +36,9 @@ import copy, os, pg, sys import apt_pkg import symlink_dists -import daklib.database as database -import daklib.logging as logging -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import utils ################################################################################ diff --git a/dak/new_security_install.py b/dak/new_security_install.py index ca119c81..4cfd2133 100755 --- a/dak/new_security_install.py +++ b/dak/new_security_install.py @@ -20,10 +20,10 @@ ################################################################################ -import daklib.queue as queue -import daklib.logging as logging -import daklib.utils as utils -import daklib.database as database +from daklib import queue +from daklib import logging +from daklib import utils +from daklib import database import apt_pkg, os, sys, pwd, time, re, commands re_taint_free = re.compile(r"^['/;\-\+\.~\s\w]+$"); diff --git a/dak/override.py b/dak/override.py index ffa6ae9a..89bac5b9 100755 --- a/dak/override.py +++ b/dak/override.py @@ -27,9 +27,9 @@ import pg, sys import apt_pkg -import daklib.logging as logging -import daklib.database as database -import daklib.utils as utils +from daklib import logging +from daklib import database +from daklib import utils ################################################################################ diff --git a/dak/process_accepted.py b/dak/process_accepted.py index 605b5c23..e99c35b3 100755 --- a/dak/process_accepted.py +++ b/dak/process_accepted.py @@ -31,10 +31,10 @@ import errno, fcntl, os, sys, time, re import apt_pkg -import daklib.database as database -import daklib.logging as logging -import daklib.queue as queue -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import queue +from daklib import utils ############################################################################### diff --git a/dak/process_new.py b/dak/process_new.py index c13ff781..c0bc51f3 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -39,10 +39,10 @@ import copy, errno, os, readline, stat, sys, time import apt_pkg, apt_inst import examine_package -import daklib.database as database -import daklib.logging as logging -import daklib.queue as queue -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import queue +from daklib import utils # Globals Cnf = None diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 11b480a0..34d1739f 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -30,10 +30,10 @@ import commands, errno, fcntl, os, re, shutil, stat, sys, time, tempfile, traceback import apt_inst, apt_pkg -import daklib.database as database -import daklib.logging as logging -import daklib.queue as queue -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import queue +from daklib import utils from daklib.dak_exceptions import * from types import * diff --git a/dak/queue_report.py b/dak/queue_report.py index 7f20ce58..aa1c54da 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -36,8 +36,8 @@ import copy, glob, os, stat, sys, time import apt_pkg -import daklib.queue as queue -import daklib.utils as utils +from daklib import queue +from daklib import utils from daklib.dak_exceptions import * Cnf = None diff --git a/dak/reject_proposed_updates.py b/dak/reject_proposed_updates.py index 060ad513..ba6dc226 100644 --- a/dak/reject_proposed_updates.py +++ b/dak/reject_proposed_updates.py @@ -21,10 +21,10 @@ import os, pg, sys import apt_pkg -import daklib.database as database -import daklib.logging as logging -import daklib.queue as queue -import daklib.utils as utils +from daklib import database +from daklib import logging +from daklib import queue +from daklib import utils ################################################################################ diff --git a/dak/rm.py b/dak/rm.py index df11a53b..7bc6cceb 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -41,8 +41,8 @@ import commands, os, pg, re, sys import apt_pkg, apt_inst -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils from daklib.dak_exceptions import * ################################################################################ diff --git a/dak/security_install.py b/dak/security_install.py index 34efeb4c..3aebedc1 100644 --- a/dak/security_install.py +++ b/dak/security_install.py @@ -32,7 +32,7 @@ import commands, os, pwd, re, sys, time import apt_pkg -import daklib.queue as queue +from daklib import queue import daklib.utils ################################################################################ diff --git a/dak/show_new.py b/dak/show_new.py index 87bea796..4b485f26 100755 --- a/dak/show_new.py +++ b/dak/show_new.py @@ -28,9 +28,9 @@ import copy, os, sys, time import apt_pkg import examine_package -import daklib.database as database -import daklib.queue as queue -import daklib.utils as utils +from daklib import database +from daklib import queue +from daklib import utils # Globals Cnf = None diff --git a/dak/split_done.py b/dak/split_done.py index 5502dcc5..5f8fadda 100755 --- a/dak/split_done.py +++ b/dak/split_done.py @@ -19,7 +19,7 @@ ################################################################################ import glob, os, stat, time -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/stats.py b/dak/stats.py index e1786c4a..20a02b55 100755 --- a/dak/stats.py +++ b/dak/stats.py @@ -32,7 +32,7 @@ import pg, sys import apt_pkg -import daklib.utils as utils +from daklib import utils ################################################################################ diff --git a/dak/transitions.py b/dak/transitions.py index 7a0da2e1..5c81e03a 100755 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -25,8 +25,8 @@ import os, pg, sys, time, errno, fcntl, tempfile, pwd, re import apt_pkg -import daklib.database as database -import daklib.utils as utils +from daklib import database +from daklib import utils import syck # Globals