diff options
| author | Barry Warsaw | 2012-04-08 19:40:38 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-04-08 19:40:38 -0400 |
| commit | fdfc98239de2cfdfff6c62a5bb9d49abc8d3722e (patch) | |
| tree | 15944f47693c8dbf3fd80292112d5f9d1ccac4d5 /src/mailman/rules | |
| parent | 2410fe8c2578fbd11275cfc7fc1897173eecd41a (diff) | |
| download | mailman-fdfc98239de2cfdfff6c62a5bb9d49abc8d3722e.tar.gz mailman-fdfc98239de2cfdfff6c62a5bb9d49abc8d3722e.tar.zst mailman-fdfc98239de2cfdfff6c62a5bb9d49abc8d3722e.zip | |
- Rename the model attributes.
- news_moderation -> newsgroup_moderation
Diffstat (limited to 'src/mailman/rules')
| -rw-r--r-- | src/mailman/rules/docs/news-moderation.rst | 6 | ||||
| -rw-r--r-- | src/mailman/rules/news_moderation.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman/rules/docs/news-moderation.rst b/src/mailman/rules/docs/news-moderation.rst index c695740fa..651c21bb4 100644 --- a/src/mailman/rules/docs/news-moderation.rst +++ b/src/mailman/rules/docs/news-moderation.rst @@ -16,8 +16,8 @@ directly to the mailing list. Set the list configuration variable to enable newsgroup moderation. - >>> from mailman.interfaces.nntp import NewsModeration - >>> mlist.news_moderation = NewsModeration.moderated + >>> from mailman.interfaces.nntp import NewsgroupModeration + >>> mlist.newsgroup_moderation = NewsgroupModeration.moderated And now all messages will match the rule. @@ -32,6 +32,6 @@ And now all messages will match the rule. When moderation is turned off, the rule does not match. - >>> mlist.news_moderation = NewsModeration.none + >>> mlist.news_moderation = NewsgroupModeration.none >>> rule.check(mlist, msg, {}) False diff --git a/src/mailman/rules/news_moderation.py b/src/mailman/rules/news_moderation.py index 4ca9a0d8a..e43bca3b7 100644 --- a/src/mailman/rules/news_moderation.py +++ b/src/mailman/rules/news_moderation.py @@ -28,7 +28,7 @@ __all__ = [ from zope.interface import implements from mailman.core.i18n import _ -from mailman.interfaces.nntp import NewsModeration +from mailman.interfaces.nntp import NewsgroupModeration from mailman.interfaces.rules import IRule @@ -46,4 +46,4 @@ class ModeratedNewsgroup: def check(self, mlist, msg, msgdata): """See `IRule`.""" - return mlist.news_moderation == NewsModeration.moderated + return mlist.news_moderation == NewsgroupModeration.moderated |
