Skip to content

Commit e07fa28

Browse files
committed
update
1 parent 225acff commit e07fa28

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Mailman/Queue/VirginRunner.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,21 @@ def _cleanup_old_messages(self):
156156
mailman_log('debug', 'VirginRunner: Cleaned up %d old message entries', len(old_msgids))
157157
except Exception as e:
158158
mailman_log('error', 'VirginRunner: Error during cleanup: %s', str(e))
159+
160+
def _onefile(self, msg, msgdata):
161+
# Ensure _dispose always gets a MailList object, not a string
162+
listname = msgdata.get('listname')
163+
if not listname:
164+
listname = mm_cfg.MAILMAN_SITE_LIST
165+
try:
166+
mlist = MailList.MailList(listname, lock=0)
167+
except Errors.MMUnknownListError:
168+
mailman_log('error', 'VirginRunner: Unknown list %s', listname)
169+
self._shunt.enqueue(msg, msgdata)
170+
return
171+
try:
172+
keepqueued = self._dispose(mlist, msg, msgdata)
173+
finally:
174+
mlist.Unlock()
175+
if keepqueued:
176+
self._switchboard.enqueue(msg, msgdata)

0 commit comments

Comments
 (0)