diff options
author | Stephen Finucane <stephen.finucane@intel.com> | 2015-08-21 15:32:17 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2015-09-17 17:58:10 +0100 |
commit | 544b8bbcc7ec80d94c96f181886c51b177530a95 (patch) | |
tree | 72f3e760511edd25a2b527dee1049c7b37f7d3ff /patchwork/management/commands/cron.py | |
parent | ac63b6b3564186191928044528e2afda862b7bc0 (diff) | |
download | patchwork-544b8bbcc7ec80d94c96f181886c51b177530a95.tar patchwork-544b8bbcc7ec80d94c96f181886c51b177530a95.tar.gz |
trivial: Resolve PEP8 issues with 'management'
(Added by Damien) This also moves from sys.stdout/sys.stderr to
self.stdout/self.stderr as adviced by the Django documentation.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'patchwork/management/commands/cron.py')
-rwxr-xr-x | patchwork/management/commands/cron.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/patchwork/management/commands/cron.py b/patchwork/management/commands/cron.py index 308b4b2..7c00ea3 100755 --- a/patchwork/management/commands/cron.py +++ b/patchwork/management/commands/cron.py @@ -1,14 +1,15 @@ -from django.core.management.base import BaseCommand, CommandError +from django.core.management.base import BaseCommand from patchwork.utils import send_notifications, do_expiry + class Command(BaseCommand): - help = ('Run periodic patchwork functions: send notifications and ' + help = ('Run periodic patchwork functions: send notifications and ' 'expire unused users') def handle(self, *args, **kwargs): errors = send_notifications() for (recipient, error) in errors: self.stderr.write("Failed sending to %s: %s" % - (recipient.email, error)) + (recipient.email, error)) do_expiry() |