[PATCH 1/6] parsemail.sh: make testing easier
Daniel Axtens
dja at axtens.net
Sun Sep 25 09:37:16 AEST 2016
Andy Doan <andy.doan at linaro.org> writes:
> On 09/22/2016 07:06 PM, Daniel Axtens wrote:
>> - Take PW_PYTHON, allowing the python version to be set
>> - Only override DJANGO_SETTINGS_MODULE if it's not in the env
>> - Pass parameters to parsemail.py
>>
>> Signed-off-by: Daniel Axtens <dja at axtens.net>
>> ---
>> patchwork/bin/parsemail.sh | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/patchwork/bin/parsemail.sh b/patchwork/bin/parsemail.sh
>> index 9973392de9d4..241f18c6bbc9 100755
>> --- a/patchwork/bin/parsemail.sh
>> +++ b/patchwork/bin/parsemail.sh
>> @@ -22,8 +22,15 @@
>> BIN_DIR=`dirname $0`
>> PATCHWORK_BASE=`readlink -e $BIN_DIR/../..`
>>
>> +if [ -z $PW_PYTHON ]; then
>> + PW_PYTHON=python2
>> +fi
>> +
>> +if [ -z $DJANGO_SETTINGS_MODULE ]; then
>> + DJANGO_SETTINGS_MODULE=patchwork.settings.production
>
> You need to export this value or won't get passed to the subprocess below.
Ahaha derp. Will respin.
Regards,
Daniel
>
>> +fi
>> +
>> PYTHONPATH="$PATCHWORK_BASE":"$PATCHWORK_BASE/lib/python:$PYTHONPATH" \
>> - DJANGO_SETTINGS_MODULE=patchwork.settings.production \
>> - "$PATCHWORK_BASE/patchwork/bin/parsemail.py"
>> + $PW_PYTHON "$PATCHWORK_BASE/patchwork/bin/parsemail.py" $@
>>
>> exit 0
>>
More information about the Patchwork
mailing list