[PATCH v3 09/10] parsemail: Convert to a management command
stephenfinucane at hotmail.com
Sat Sep 3 04:58:53 AEST 2016
On 02 Sep 11:21, Daniel Axtens wrote:
> > +++ b/patchwork/bin/parsemail.sh
> > @@ -24,6 +24,8 @@ PATCHWORK_BASE=`readlink -e $BIN_DIR/../..`
> > PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \
> > DJANGO_SETTINGS_MODULE=patchwork.settings.production \
> > - "$PATCHWORK_BASE/patchwork/bin/parsemail.py"
> > + "$PATCHWORK_BASE/patchwork/manage.py parsemail" $@
> So, I went to test this and found a couple of other issues:
> - If you quote the entire thing, you try to execute the program
> manage.py\ parsemail - not what you want. The quote needs to be
> moved to after manage.py.
> - manage.py lives in PATCHWORK_BASE, not PATCHWORK_BASE/patchwork/
> - This will fail in the Python 3 case. (It'd also be nice to be able to
> override DJANGO_SETTINGS_MODULE.) Both of these are only really
> issues when you're testing, rather than production issues.
All valid issues - whoops. I'll post a new version of these two patches
and submit the rest of them, which Andy has already reviewed.
More information about the Patchwork