summaryrefslogtreecommitdiff
path: root/src/mailman/model/bans.py
diff options
context:
space:
mode:
authorAurélien Bompard2016-01-11 16:03:27 +0100
committerBarry Warsaw2016-01-13 14:20:16 -0500
commitad53d7612898b6ee12cd3daac449bed3a538dba4 (patch)
treeea1bdf20051ea4d82930fadd4d6ad40026b29aa1 /src/mailman/model/bans.py
parent187dad97bf278b0ca9d080774072e8fb235154cc (diff)
downloadmailman-ad53d7612898b6ee12cd3daac449bed3a538dba4.tar.gz
mailman-ad53d7612898b6ee12cd3daac449bed3a538dba4.tar.zst
mailman-ad53d7612898b6ee12cd3daac449bed3a538dba4.zip
Diffstat (limited to 'src/mailman/model/bans.py')
-rw-r--r--src/mailman/model/bans.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mailman/model/bans.py b/src/mailman/model/bans.py
index a1ed24b76..0a3259167 100644
--- a/src/mailman/model/bans.py
+++ b/src/mailman/model/bans.py
@@ -111,3 +111,8 @@ class BanManager:
re.match(ban.email, email, re.IGNORECASE) is not None):
return True
return False
+
+ @dbconnection
+ def __iter__(self, store):
+ """See `IBanManager`."""
+ yield from store.query(Ban).filter_by(list_id=self._list_id)