summaryrefslogtreecommitdiff
path: root/src/mailman/model/listmanager.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-03-25 11:01:46 -0400
committerBarry Warsaw2016-03-25 11:01:46 -0400
commit7fd9e5ab09b0da347da0607b47d2d3838bd80f0c (patch)
treeb150f85e5fc482f45e973a233b5184d3ca4b78a7 /src/mailman/model/listmanager.py
parent71ebe367a52316811f570d09f2213c192a47973f (diff)
downloadmailman-7fd9e5ab09b0da347da0607b47d2d3838bd80f0c.tar.gz
mailman-7fd9e5ab09b0da347da0607b47d2d3838bd80f0c.tar.zst
mailman-7fd9e5ab09b0da347da0607b47d2d3838bd80f0c.zip
Diffstat (limited to 'src/mailman/model/listmanager.py')
-rw-r--r--src/mailman/model/listmanager.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mailman/model/listmanager.py b/src/mailman/model/listmanager.py
index 074b6b600..0ad29880f 100644
--- a/src/mailman/model/listmanager.py
+++ b/src/mailman/model/listmanager.py
@@ -17,6 +17,7 @@
"""A mailing list manager."""
+from mailman import public
from mailman.database.transaction import dbconnection
from mailman.interfaces.address import InvalidEmailAddressError
from mailman.interfaces.listmanager import (
@@ -31,11 +32,8 @@ from mailman.utilities.datetime import now
from zope.event import notify
from zope.interface import implementer
-__all__ = [
- 'ListManager',
- ]
-
+@public
@implementer(IListManager)
class ListManager:
"""An implementation of the `IListManager` interface."""
@@ -47,7 +45,7 @@ class ListManager:
listname, at, hostname = fqdn_listname.partition('@')
if len(hostname) == 0:
raise InvalidEmailAddressError(fqdn_listname)
- list_id = '{0}.{1}'.format(listname, hostname)
+ list_id = '{}.{}'.format(listname, hostname)
notify(ListCreatingEvent(fqdn_listname))
mlist = store.query(MailingList).filter_by(_list_id=list_id).first()
if mlist:
@@ -62,7 +60,7 @@ class ListManager:
def get(self, store, fqdn_listname):
"""See `IListManager`."""
listname, at, hostname = fqdn_listname.partition('@')
- list_id = '{0}.{1}'.format(listname, hostname)
+ list_id = '{}.{}'.format(listname, hostname)
return store.query(MailingList).filter_by(_list_id=list_id).first()
@dbconnection