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/bounce.py | |
| parent | 58ee14bfb1c1c24d06fb0509e42e06e37a505479 (diff) | |
| download | mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.tar.gz mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.tar.zst mailman-03bb57c8c2a47a08e19b20975622ebb2ef2b81c6.zip | |
Diffstat (limited to 'src/mailman/model/bounce.py')
| -rw-r--r-- | src/mailman/model/bounce.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mailman/model/bounce.py b/src/mailman/model/bounce.py index e05bda516..3ccf58091 100644 --- a/src/mailman/model/bounce.py +++ b/src/mailman/model/bounce.py @@ -54,8 +54,6 @@ class BounceEvent(Model): self.email = email self.timestamp = now() msgid = msg['message-id'] - if isinstance(msgid, bytes): - msgid = msgid.decode('ascii') self.message_id = msgid self.context = (BounceContext.normal if context is None else context) self.processed = False @@ -77,12 +75,10 @@ class BounceProcessor: @dbconnection def events(self, store): """See `IBounceProcessor`.""" - for event in store.query(BounceEvent).all(): - yield event + yield from store.query(BounceEvent).all() @property @dbconnection def unprocessed(self, store): """See `IBounceProcessor`.""" - for event in store.query(BounceEvent).filter_by(processed=False): - yield event + yield from store.query(BounceEvent).filter_by(processed=False) |
