Resolve two bugs with the script:

- There's no 'main' function to call
- A variable is misnamed

Signed-off-by: Stephen Finucane <[email protected]>
---
 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.0.0

_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to