[PATCH v2 7/7] parsemail: Convert to a management command

Stephen Finucane stephen at that.guru
Sat Oct 8 22:49:23 AEDT 2016


On 28 Sep 15:23, Daniel Axtens wrote:
> Management comands allow applications to register their own actions with
> 'manage.py'. This provides some advantages, like automatically
> configuring Django (removing the need for 'django.setup' calls) and
> removing the need to set the PYTHON_PATH. The 'parsemail' script is a
> natural fit for this type of application. Migrate 'parsemail' to a
> management command.
> 
> This includes some extensive work on logging configuration, as logging
> is moved from code into settings. In addition, it removes a lot of the
> customizable logging previously introduced in the parsemail command, in
> favour of modifications to the settings files.
> 
> Originally-by: Stephen Finucane <stephenfinucane at hotmail.com>
> Partial-bug: #17
> Closes-bug: #15
> [dja: significant changes:
>  - fix merge conflicts with my changes to parsemail.sh
>  - py3 binary file email parsing
>  - make stdin tests close and re-open stdin]
> Signed-off-by: Daniel Axtens <dja at axtens.net>

Fixed some PEP8 issues and included my 'Signed-off-by'. Applied.

Stephen


More information about the Patchwork mailing list