summaryrefslogtreecommitdiff
path: root/Mailman/app/rules.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-01-01 22:37:08 -0500
committerBarry Warsaw2008-01-01 22:37:08 -0500
commit6ca002e04d647671d55ee928fe134b0e223606cb (patch)
tree16f0ace720c78d49b06d5587618a82565305c24e /Mailman/app/rules.py
parentadae635a4ca147937019fdd91aebd95a2769b9ca (diff)
downloadmailman-6ca002e04d647671d55ee928fe134b0e223606cb.tar.gz
mailman-6ca002e04d647671d55ee928fe134b0e223606cb.tar.zst
mailman-6ca002e04d647671d55ee928fe134b0e223606cb.zip
Fix the rule api once more so that while rules themselves are still classes,
they are instantiated by the IRuleSet, thus keeping the promises of the interface. The ChainJump enum is moved to interfaces/chain.py. This will be fleshed out subsequently.
Diffstat (limited to 'Mailman/app/rules.py')
-rw-r--r--Mailman/app/rules.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/app/rules.py b/Mailman/app/rules.py
index e4c3c8c40..37f5d9af4 100644
--- a/Mailman/app/rules.py
+++ b/Mailman/app/rules.py
@@ -45,7 +45,7 @@ def process(mlist, msg, msgdata, rule_set=None):
# Now process all rules, returning the set of rules that match.
rule_matches = set()
for rule in rules:
- if rule().check(mlist, msg, msgdata):
+ if rule.check(mlist, msg, msgdata):
rule_matches.add(rule.name)
return rule_matches
@@ -60,5 +60,5 @@ def find_rule(rule_name):
for rule_set_class in get_plugins('mailman.rules'):
rule = rule_set_class().get(rule_name)
if rule is not None:
- return rule()
+ return rule
return None