From 56febdf94df1ea454e49e9e1a8cc4cbc63e42068 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 21 Aug 2015 15:32:15 +0100 Subject: [PATCH] management: Resolve bugs with 'cron' command Resolve two bugs with the script: - There's no 'main' function to call - A variable is misnamed Reviewed-by: Damien Lespiau Signed-off-by: Stephen Finucane Signed-off-by: Damien Lespiau --- patchwork/management/commands/cron.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/patchwork/management/commands/cron.py b/patchwork/management/commands/cron.py index 6217e75..308b4b2 100755 --- a/patchwork/management/commands/cron.py +++ b/patchwork/management/commands/cron.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - from django.core.management.base import BaseCommand, CommandError from patchwork.utils import send_notifications, do_expiry @@ -11,10 +9,6 @@ class Command(BaseCommand): errors = send_notifications() for (recipient, error) in errors: self.stderr.write("Failed sending to %s: %s" % - (recipient.email, ex)) + (recipient.email, error)) do_expiry() - -if __name__ == '__main__': - sys.exit(main(sys.argv)) - -- 2.39.2