From 1ad73a52bb9d82ef3af1e34ad9ef66ac2eda2909 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 10 Oct 2007 23:22:03 -0400 Subject: General cleanups some of which is even tested . Mailman.LockFile module is moved to Mailman.lockfile. Remove a few more MailList methods that aren't used any more, e.g. the lock related stuff, the Save() and CheckValues() methods, as well as ChangeMemberName(). Add a missing import to lifecycle.py. We no longer need withlist to unlock the mailing list. Also, expose config.db.flush() in the namespace of withlist directly, under 'flush'. --- Mailman/bin/mailmanctl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Mailman/bin/mailmanctl.py') diff --git a/Mailman/bin/mailmanctl.py b/Mailman/bin/mailmanctl.py index f6190f685..07716029b 100644 --- a/Mailman/bin/mailmanctl.py +++ b/Mailman/bin/mailmanctl.py @@ -27,9 +27,9 @@ import optparse from Mailman import Defaults from Mailman import Errors -from Mailman import LockFile from Mailman import Utils from Mailman import Version +from Mailman import lockfile from Mailman import loginit from Mailman.configuration import config from Mailman.i18n import _ @@ -197,11 +197,11 @@ def qrunner_state(): def acquire_lock_1(force): # Be sure we can acquire the master qrunner lock. If not, it means some # other master qrunner daemon is already going. - lock = LockFile.LockFile(config.LOCK_FILE, LOCK_LIFETIME) + lock = lockfile.LockFile(config.LOCK_FILE, LOCK_LIFETIME) try: lock.lock(0.1) return lock - except LockFile.TimeOutError: + except lockfile.TimeOutError: if not force: raise # Force removal of lock first @@ -216,7 +216,7 @@ def acquire_lock(force): try: lock = acquire_lock_1(force) return lock - except LockFile.TimeOutError: + except lockfile.TimeOutError: status = qrunner_state() if status == 1: # host matches and proc exists -- cgit v1.2.3-70-g09d2