From 7823737b1ee074a358175501de23d1466886d323 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 2 Sep 2012 10:22:26 -0400 Subject: [PATCH] mailpipe: respond with the fleshed out message, not the original. We've just added an author, targets, subject, etc. None of that matters if you send the original version. Also print check that the subject is not None before we remove any subject fields. This shouldn't matter (del-ing a None subject should be a no-op), but it seems safer to print the offending message before messing with it. --- pygrader/mailpipe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygrader/mailpipe.py b/pygrader/mailpipe.py index 1cd3f90..fa01d98 100644 --- a/pygrader/mailpipe.py +++ b/pygrader/mailpipe.py @@ -625,12 +625,12 @@ def mailpipe(basedir, course, stream=None, mailbox=None, input_=None, del msg['content-transfer-encoding'] msg.set_payload(new_payload, new_encoding) subject = msg['Subject'] - del msg['Subject'] assert subject is not None, msg + del msg['Subject'] msg = _construct_email( author=author, targets=[person], subject=subject, message=msg) - respond(response.message) + respond(msg) def _load_messages(course, stream, mailbox=None, input_=None, output=None, -- 2.26.2