diff options
| author | Barry Warsaw | 2016-01-11 22:52:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2016-01-11 22:52:33 -0500 |
| commit | 03bb57c8c2a47a08e19b20975622ebb2ef2b81c6 (patch) | |
| tree | 332bf1e5e36da0a3cb4271b1a471a62865071a62 /src/mailman/model/mailinglist.py | |
| parent | 58ee14bfb1c1c24d06fb0509e42e06e37a505479 (diff) | |
| download | mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.tar.gz mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.tar.zst mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.zip | |
Diffstat (limited to 'src/mailman/model/mailinglist.py')
| -rw-r--r-- | src/mailman/model/mailinglist.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mailman/model/mailinglist.py b/src/mailman/model/mailinglist.py index 43cc26c6e..f8d1481a2 100644 --- a/src/mailman/model/mailinglist.py +++ b/src/mailman/model/mailinglist.py @@ -431,7 +431,7 @@ class MailingList(Model): ContentFilter.mailing_list == self, ContentFilter.filter_type == FilterType.pass_extension) for content_filter in results: - yield content_filter.pass_pattern + yield content_filter.filter_pattern @pass_extensions.setter @dbconnection @@ -459,7 +459,7 @@ class MailingList(Model): elif role is MemberRole.nonmember: return self.nonmembers else: - raise TypeError('Undefined MemberRole: {}'.format(role)) + raise ValueError('Undefined MemberRole: {}'.format(role)) @dbconnection def subscribe(self, store, subscriber, role=MemberRole.member): @@ -576,10 +576,10 @@ class ListArchiver(Model): @property def system_archiver(self): - for archiver in config.archivers: + for archiver in config.archivers: # pragma: no branch if archiver.name == self.name: return archiver - return None + raise AssertionError('Archiver not found: {}'.format(self.name)) @property def is_enabled(self): @@ -613,8 +613,7 @@ class ListArchiverSet: def archivers(self, store): entries = store.query(ListArchiver).filter( ListArchiver.mailing_list == self._mailing_list) - for entry in entries: - yield entry + yield from entries @dbconnection def get(self, store, archiver_name): |
