Fix in error_reporting
This commit is contained in:
parent
49fafab88f
commit
e632432886
1 changed files with 13 additions and 6 deletions
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
from settings import config
|
||||
from paramecio.citoplasma.sendmail import SendMail
|
||||
import sys, traceback
|
||||
|
||||
email_failed=''
|
||||
|
||||
if hasattr(config, 'email_failed'):
|
||||
email_failed=config.email_failed
|
||||
|
||||
class ErrorReportingPlugin(object):
|
||||
|
||||
|
|
@ -25,14 +31,15 @@ class ErrorReportingPlugin(object):
|
|||
#print('detected error')
|
||||
|
||||
# Send mail with error.
|
||||
"""
|
||||
sendmail=SendMail()
|
||||
|
||||
if email_failed!='':
|
||||
|
||||
sendmail.send(email_failed, [email_failed], 'Hubo un error al añadir el mail a mailchimp', r.text, content_type='plain', attachments=[])
|
||||
print(post.post['email']+'error in mailchimp: '+r.text)
|
||||
sendmail=SendMail()
|
||||
|
||||
text=traceback.format_exc()
|
||||
|
||||
sendmail.send(email_failed, [email_failed], 'Error reporting from site', text, content_type='plain', attachments=[])
|
||||
|
||||
rv = callback(*args, **kwargs)
|
||||
"""
|
||||
raise
|
||||
#return rv
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue