summaryrefslogtreecommitdiff
path: root/src/mailman/model/domain.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/domain.py
parent71ebe367a52316811f570d09f2213c192a47973f (diff)
downloadmailman-7fd9e5ab09b0da347da0607b47d2d3838bd80f0c.tar.gz
mailman-7fd9e5ab09b0da347da0607b47d2d3838bd80f0c.tar.zst
mailman-7fd9e5ab09b0da347da0607b47d2d3838bd80f0c.zip
Diffstat (limited to 'src/mailman/model/domain.py')
-rw-r--r--src/mailman/model/domain.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mailman/model/domain.py b/src/mailman/model/domain.py
index fb73bf470..8607f0d94 100644
--- a/src/mailman/model/domain.py
+++ b/src/mailman/model/domain.py
@@ -17,6 +17,7 @@
"""Domains."""
+from mailman import public
from mailman.database.model import Model
from mailman.database.transaction import dbconnection
from mailman.interfaces.domain import (
@@ -32,12 +33,8 @@ from zope.event import notify
from zope.interface import implementer
from zope.component import getUtility
-__all__ = [
- 'Domain',
- 'DomainManager',
- ]
-
+@public
@implementer(IDomain)
class Domain(Model):
"""Domains."""
@@ -134,6 +131,7 @@ class Domain(Model):
self.owners.remove(user_manager.get_user(owner))
+@public
@implementer(IDomainManager)
class DomainManager:
"""Domain manager."""
@@ -149,7 +147,7 @@ class DomainManager:
# a constraint that should (also) be maintained in the database.
if self.get(mail_host) is not None:
raise BadDomainSpecificationError(
- 'Duplicate email host: %s' % mail_host)
+ 'Duplicate email host: {}'.format(mail_host))
notify(DomainCreatingEvent(mail_host))
domain = Domain(mail_host, description, base_url, owners)
store.add(domain)