def notify_parse_error(subproject, translation, error, filename):
 subscriptions = Profile.objects.subscribed_merge_failure(subproject.project)
 users = set()
 mails = []
 for subscription in subscriptions:
  mails.append(subscription.notify_parse_error(subproject, translation, error, filename))
  users.add(subscription.user_id)
 for owner in subproject.project.owners.all():
  mails.append(owner.profile.notify_parse_error(subproject, translation, error, filename))
 mails.append(get_notification_email(u'en', u'ADMINS', u'parse_error', (translation if (translation is not None) else subproject), {u'subproject': subproject, u'translation': translation, u'error': error, u'filename': filename}))
 send_mails(mails)

def notify_parse_error ( subproject , translation , error , filename ) : subscriptions = Profile . objects . subscribed_merge_failure ( subproject . project ) users = set ( ) mails = [ ] for subscription in subscriptions : mails . append ( subscription . notify_parse_error ( subproject , translation , error , filename ) ) users . add ( subscription . user_id ) for owner in subproject . project . owners . all ( ) : mails . append ( owner . profile . notify_parse_error ( subproject , translation , error , filename ) ) mails . append ( get_notification_email ( u'en' , u'ADMINS' , u'parse_error' , ( translation if ( translation is not None ) else subproject ) , { u'subproject' : subproject , u'translation' : translation , u'error' : error , u'filename' : filename } ) ) send_mails ( mails )
notification on parse error .