summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/bans.py
diff options
context:
space:
mode:
authorAmit Tripathi2016-09-28 01:48:43 +0530
committerBarry Warsaw2016-10-25 20:39:12 -0400
commit96f276472852d069828c5729f5a5a0d1a83d4b2d (patch)
tree2ad094904fd4d5a027c670e141dd2b5ad3506143 /src/mailman/interfaces/bans.py
parent1eec4bf88bb9bb1e6d393b5e80a58a929e6439b4 (diff)
downloadmailman-96f276472852d069828c5729f5a5a0d1a83d4b2d.tar.gz
mailman-96f276472852d069828c5729f5a5a0d1a83d4b2d.tar.zst
mailman-96f276472852d069828c5729f5a5a0d1a83d4b2d.zip
replaced `find` method with `bans` property
Diffstat (limited to 'src/mailman/interfaces/bans.py')
-rw-r--r--src/mailman/interfaces/bans.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mailman/interfaces/bans.py b/src/mailman/interfaces/bans.py
index 3401f286e..72ee525d1 100644
--- a/src/mailman/interfaces/bans.py
+++ b/src/mailman/interfaces/bans.py
@@ -46,6 +46,9 @@ class IBanManager(Interface):
to an `IBanManager`. To manage global bans, adapt ``None``.
"""
+ bans = Attribute(
+ """A `QuerySequence` over all the banned emails""")
+
def ban(email):
"""Ban an email address from subscribing to a mailing list.
@@ -93,16 +96,7 @@ class IBanManager(Interface):
:rtype: bool
"""
- def find():
- """Return the sequence of baned emails
-
- :return: The list of all banned addresses.
- :rtype: list of `IBan`
- """
-
def __iter__():
- """Iterate over all banned addresses.
+ """An iterator over all the banned email addresses.
- :return: The list of all banned addresses.
- :rtype: list of `IBan`
- """
+ :return: iterator over `IBan`"""