comparison roundup/mailer.py @ 3569:3954fbcefae5

fix incompatibility with python2.3 [SF#1432602]
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Thu, 16 Feb 2006 06:33:05 +0000
parents 61d48244e7a8
children a052781093d7
comparison
equal deleted inserted replaced
3568:d9d5b1c9fb28 3569:3954fbcefae5
1 """Sending Roundup-specific mail over SMTP. 1 """Sending Roundup-specific mail over SMTP.
2 """ 2 """
3 __docformat__ = 'restructuredtext' 3 __docformat__ = 'restructuredtext'
4 # $Id: mailer.py,v 1.15 2006-02-08 03:47:28 richard Exp $ 4 # $Id: mailer.py,v 1.16 2006-02-16 06:33:05 a1s Exp $
5 5
6 import time, quopri, os, socket, smtplib, re, sys, traceback 6 import time, quopri, os, socket, smtplib, re, sys, traceback
7 7
8 from cStringIO import StringIO 8 from cStringIO import StringIO
9 from MimeWriter import MimeWriter 9 from MimeWriter import MimeWriter
147 '''Send a message to the admins with information about the latest 147 '''Send a message to the admins with information about the latest
148 traceback. 148 traceback.
149 ''' 149 '''
150 subject = '%s: %s'%(self.config.TRACKER_NAME, sys.exc_info()[1]) 150 subject = '%s: %s'%(self.config.TRACKER_NAME, sys.exc_info()[1])
151 to = [self.config.ADMIN_EMAIL] 151 to = [self.config.ADMIN_EMAIL]
152 content = traceback.format_exc() 152 content = '\n'.join(traceback.format_exception(*sys.exc_info()))
153 self.standard_message(to, subject, content) 153 self.standard_message(to, subject, content)
154 154
155 def smtp_send(self, to, message): 155 def smtp_send(self, to, message):
156 """Send a message over SMTP, using roundup's config. 156 """Send a message over SMTP, using roundup's config.
157 157

Roundup Issue Tracker: http://roundup-tracker.org/