<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>> Hi Stephen,<br>> <br>> > PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \<br>> > DJANGO_SETTINGS_MODULE=patchwork.settings.production \<br>> > - "$PATCHWORK_BASE/patchwork/bin/parsemail.py"<br>> > + "$PATCHWORK_BASE/patchwork/manage.py parsemail" $@<br>> ><br>> Looks good :)<br>> <br>> > +# NOTE(stephenfin): We must return 0 here. For more information, refer<br>> > +# to https://patchwork.ozlabs.org/patch/602248/<br>> > exit 0<br>> <br>> Could we just put the reason inline? Perhaps:<br>> <br>> "When parsemail is used as a delivery command from a mail server like<br>> postfix (as it is intended to be), a non-zero exit code will cause a<br>> bounce message to be returned to the user. We don't want to do that for<br>> a parse error, so always return 0."<br><br>OK, I'll do that when I merge.<br><br>> > +from email import message_from_file<br>> > +import logging<br>> > +from optparse import make_option<br>> As I mentioned for v2, this should be moved to argparse for Django 1.10<br>> compatibility. <br><br>This breaks compatibility with Django 1.6 though, which we still</div><div>need to support. <span style="font-size: 12pt;">I'll probably implement a compat library, but I'll</span></div><div><span style="font-size: 12pt;">do this in a </span><span style="font-size: 12pt;">follow-up. Is that OK by you?</span></div><div><br></div><div>Stephen</div> </div></body>
</html>