[PATCH] parsemail: Clarify exit codes

Stephen Finucane stephen at that.guru
Fri May 4 00:07:55 AEST 2018

On Tue, 2018-05-01 at 01:44 +1000, Daniel Axtens wrote:
> jk reports that the patchwork error codes are really unhelpful for
> correct integration with an MDA. In particular they make sorting out
> failures into a separate queue very difficult. Make this better and
> clearer: only return 1 on a genuinely unexpected case that requires
> adminstrator intervention.
> Update the comment for parse_mail regarding return values and exceptions
> to line up with how the function actually works and how we use the
> results.
> Update the tests. None of the existing tests should exit 1; they're
> all 'expected' failures: unknown project etc. Also we removed the
> exit(0) from the success path, so stop expecting that exception to
> be raised.
> Add a test for duplicates. That should also succeed without raising
> an exception: dups are part of life.
> Update parsearchive to deal with the fact that we can no longer
> differentiate duplicates.
> Reported-by: Jeremy Kerr <jk at ozlabs.org>
> Fixes: #171
> Signed-off-by: Daniel Axtens <dja at axtens.net>

This sounds fine to me and all the changes make sense.

Reviewed-by: Stephen Finucane <stephen at that.guru>

...and applied.

More information about the Patchwork mailing list