summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2000-07-22 00:21:49 +0000
committerbwarsaw2000-07-22 00:21:49 +0000
commit67845189883017908f56069d1def149861540fd7 (patch)
tree05811298f41a6d8e281ca66ab96d129664f2fc5c
parent249cdca3058dc73aa15528ec69c2fa10fda49e1f (diff)
downloadmailman-67845189883017908f56069d1def149861540fd7.tar.gz
mailman-67845189883017908f56069d1def149861540fd7.tar.zst
mailman-67845189883017908f56069d1def149861540fd7.zip
GetOwnerEmail(): new method to return the -owner address.
Lock(): If the Load() call fails with an MMUnknownListError, be sure to unlock the list before re-raising the exception.
-rw-r--r--Mailman/MailList.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 2eb444b84..d66814b21 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -71,7 +71,7 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
self.InitTempVars(name)
if name:
if lock:
- # This will load the database
+ # This will load the database.
self.Lock()
else:
self.Load()
@@ -132,6 +132,9 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
def GetAdminEmail(self):
return '%s-admin@%s' % (self._internal_name, self.host_name)
+ def GetOwnerEmail(self):
+ return '%s-owner@%s' % (self._internal_name, self.host_name)
+
def GetMemberAdminEmail(self, member):
"""Usually the member addr, but modified for umbrella lists.
@@ -1339,8 +1342,13 @@ it will not be changed."""),
def Lock(self, timeout=0):
self.__lock.lock(timeout)
- # Must reload our database for consistency
- self.Load()
+ # Must reload our database for consistency. Watch out for lists that
+ # don't exist.
+ try:
+ self.Load()
+ except Errors.MMUnknownListError:
+ self.Unlock()
+ raise
def Unlock(self):
self.__lock.unlock(unconditionally=1)