summaryrefslogtreecommitdiff
path: root/Mailman/Archiver
diff options
context:
space:
mode:
authorBarry Warsaw2007-10-10 23:22:03 -0400
committerBarry Warsaw2007-10-10 23:22:03 -0400
commit1ad73a52bb9d82ef3af1e34ad9ef66ac2eda2909 (patch)
tree7985eda24e60a39d58c54436e99f975610ee947d /Mailman/Archiver
parent15f9e73fdb96a145632e5916cc0073472c014c99 (diff)
downloadmailman-1ad73a52bb9d82ef3af1e34ad9ef66ac2eda2909.tar.gz
mailman-1ad73a52bb9d82ef3af1e34ad9ef66ac2eda2909.tar.zst
mailman-1ad73a52bb9d82ef3af1e34ad9ef66ac2eda2909.zip
General cleanups some of which is even tested <wink>. 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'.
Diffstat (limited to 'Mailman/Archiver')
-rw-r--r--Mailman/Archiver/HyperArch.py6
-rw-r--r--Mailman/Archiver/HyperDatabase.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Archiver/HyperArch.py b/Mailman/Archiver/HyperArch.py
index 80d4ea7a4..7ce0905ca 100644
--- a/Mailman/Archiver/HyperArch.py
+++ b/Mailman/Archiver/HyperArch.py
@@ -43,10 +43,10 @@ from email.Errors import HeaderParseError
from email.Header import decode_header, make_header
from Mailman import Errors
-from Mailman import LockFile
from Mailman import MailList
from Mailman import Utils
from Mailman import i18n
+from Mailman import lockfile
from Mailman.Archiver import HyperDatabase
from Mailman.Archiver import pipermail
from Mailman.Mailbox import ArchiverMailbox
@@ -786,12 +786,12 @@ class HyperArchive(pipermail.T):
def GetArchLock(self):
if self._lock_file:
return 1
- self._lock_file = LockFile.LockFile(
+ self._lock_file = lockfile.LockFile(
os.path.join(config.LOCK_DIR,
self.maillist.fqdn_listname + '-arch.lock'))
try:
self._lock_file.lock(timeout=0.5)
- except LockFile.TimeOutError:
+ except lockfile.TimeOutError:
return 0
return 1
diff --git a/Mailman/Archiver/HyperDatabase.py b/Mailman/Archiver/HyperDatabase.py
index 36c299846..3644fbc58 100644
--- a/Mailman/Archiver/HyperDatabase.py
+++ b/Mailman/Archiver/HyperDatabase.py
@@ -27,7 +27,7 @@ import errno
# package/project modules
#
import pipermail
-from Mailman import LockFile
+from Mailman.lockfile import LockFile
CACHESIZE = pipermail.CACHESIZE
@@ -58,7 +58,7 @@ class DumbBTree:
def __init__(self, path):
self.current_index = 0
self.path = path
- self.lockfile = LockFile.LockFile(self.path + ".lock")
+ self.lockfile = LockFile(self.path + ".lock")
self.lock()
self.__dirty = 0
self.dict = {}