From: W. Trevor King Date: Sun, 2 Sep 2012 13:06:17 +0000 (-0400) Subject: mailpipe: print error messages when we continue_after_invalid_message. X-Git-Tag: v0.3~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=43088c73970c8221cf0fb9a4fc14f5562155f8e1;p=pygrader.git mailpipe: print error messages when we continue_after_invalid_message. Since we're not raising the message, we should log it. Otherwise the user may not know that something is amiss. --- diff --git a/pygrader/mailpipe.py b/pygrader/mailpipe.py index dd88d82..3f3652a 100644 --- a/pygrader/mailpipe.py +++ b/pygrader/mailpipe.py @@ -573,6 +573,7 @@ def mailpipe(basedir, course, stream=None, mailbox=None, input_=None, _LOG.warn('invalid message {}'.format(error.message_id())) if not continue_after_invalid_message: raise + _LOG.warn('{}'.format(error)) if respond: response = _get_error_response(error) respond(response) @@ -641,6 +642,7 @@ def _load_messages(course, stream, mailbox=None, input_=None, output=None, _LOG.warn('invalid message {}'.format(error.message_id())) if not continue_after_invalid_message: raise + _LOG.warn('{}'.format(error)) if respond: response = _get_error_response(error) if response is not None: