summaryrefslogtreecommitdiff
path: root/src/mailman/model/listmanager.py
diff options
context:
space:
mode:
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