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
--- 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