Skip to content

Commit 23edf51

Browse files
committed
update
1 parent a56565c commit 23edf51

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

Mailman/Queue/Runner.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,17 @@ def _validate_message(self, msg, msgdata):
288288
return msg, False
289289

290290
def _onefile(self, msg, msgdata):
291-
# Validate message type first
292-
msg, success = self._validate_message(msg, msgdata)
293-
if not success:
294-
syslog('error', 'Message validation failed, moving to shunt queue')
295-
self._shunt.enqueue(msg, msgdata)
296-
return
297-
298-
# Do some common sanity checking on the message metadata
291+
# Initialize mlist as None at the start
292+
mlist = None
299293
try:
294+
# Validate message type first
295+
msg, success = self._validate_message(msg, msgdata)
296+
if not success:
297+
syslog('error', 'Message validation failed, moving to shunt queue')
298+
self._shunt.enqueue(msg, msgdata)
299+
return
300+
301+
# Do some common sanity checking on the message metadata
300302
# Check for duplicate messages early
301303
msgid = msg.get('message-id', 'n/a')
302304
if hasattr(self, '_processed_messages') and msgid in self._processed_messages:
@@ -311,6 +313,7 @@ def _onefile(self, msg, msgdata):
311313
self.log_error('missing_list', 'List not found', msg=msg, listname=listname)
312314
self._shunt.enqueue(msg, msgdata)
313315
return
316+
314317
# Now process this message, keeping track of any subprocesses that may
315318
# have been spawned. We'll reap those later.
316319
#

0 commit comments

Comments
 (0)