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 settings import config
|
||||||
from paramecio.citoplasma.sendmail import SendMail
|
from paramecio.citoplasma.sendmail import SendMail
|
||||||
|
import sys, traceback
|
||||||
|
|
||||||
|
email_failed=''
|
||||||
|
|
||||||
|
if hasattr(config, 'email_failed'):
|
||||||
|
email_failed=config.email_failed
|
||||||
|
|
||||||
class ErrorReportingPlugin(object):
|
class ErrorReportingPlugin(object):
|
||||||
|
|
||||||
|
|
@ -25,14 +31,15 @@ class ErrorReportingPlugin(object):
|
||||||
#print('detected error')
|
#print('detected error')
|
||||||
|
|
||||||
# Send mail with error.
|
# Send mail with error.
|
||||||
"""
|
|
||||||
sendmail=SendMail()
|
|
||||||
|
|
||||||
sendmail.send(email_failed, [email_failed], 'Hubo un error al añadir el mail a mailchimp', r.text, content_type='plain', attachments=[])
|
if email_failed!='':
|
||||||
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
|
raise
|
||||||
#return rv
|
#return rv
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue