def run(mail_string): try: _process_mail(mail_string) except Exception: transaction.rollback() return sys.exc_info() else: transaction.commit() return None
def process_mail(mail_string): translation.activate(settings.LANGUAGE_CODE) return _process_mail(mail_string)