Changed the type of Error occurring when no valid sender could be found to a FatalJobError in student_proposal_mailer.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 19 Apr 2009 10:46:20 +0000
changeset 2240 df37a3ff8ed5
parent 2239 9a47a64dcc08
child 2241 5e5b7f5d9a89
Changed the type of Error occurring when no valid sender could be found to a FatalJobError in student_proposal_mailer. This means that the job will be immediately aborted. This patch is due to comments on r3000 by SRabbelier. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/cron/student_proposal_mailer.py
--- a/app/soc/cron/student_proposal_mailer.py	Sun Apr 19 10:37:10 2009 +0000
+++ b/app/soc/cron/student_proposal_mailer.py	Sun Apr 19 10:46:20 2009 +0000
@@ -121,7 +121,6 @@
     job_entity: a Job entity with key_data set to [student_key]
   """
 
-  from soc.cron.job import Error
   from soc.cron.job import FatalJobError
 
 
@@ -142,8 +141,9 @@
 
     if not default_sender:
       # no default sender abort
-      raise Error('No valid sender address could be found, try setting '
-                  'a no-reply address on the site settings page')
+      raise FatalJobError('No valid sender address could be found, try '
+                          'setting a no-reply address on the site settings '
+                          'page')
     else:
       (sender_name, sender) = default_sender