comparison roundup/mailgw.py @ 218:877042bf42e8

oops ;)
author Richard Jones <richard@users.sourceforge.net>
date Wed, 08 Aug 2001 00:08:03 +0000
parents 18134bffab37
children 152fedaab07c
comparison
equal deleted inserted replaced
217:b02a69130c91 218:877042bf42e8
70 set() method to add the message to the item's spool; in the second case we 70 set() method to add the message to the item's spool; in the second case we
71 are calling the create() method to create a new node). If an auditor raises 71 are calling the create() method to create a new node). If an auditor raises
72 an exception, the original message is bounced back to the sender with the 72 an exception, the original message is bounced back to the sender with the
73 explanatory message given in the exception. 73 explanatory message given in the exception.
74 74
75 $Id: mailgw.py,v 1.10 2001-08-07 00:24:42 richard Exp $ 75 $Id: mailgw.py,v 1.11 2001-08-08 00:08:03 richard Exp $
76 ''' 76 '''
77 77
78 78
79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
80 import traceback 80 import traceback
152 ''' message - a Message instance 152 ''' message - a Message instance
153 153
154 Parse the message as per the module docstring. 154 Parse the message as per the module docstring.
155 ''' 155 '''
156 # handle the subject line 156 # handle the subject line
157 m = subject_re.match(message.getheader('subject')) 157 subject = message.getheader('subject')
158 m = subject_re.match(subject)
158 if not m: 159 if not m:
159 raise ValueError, 'No [designator] found in subject "%s"' 160 raise ValueError, 'No [designator] found in subject "%s"'%subject
160 classname = m.group('classname') 161 classname = m.group('classname')
161 nodeid = m.group('nodeid') 162 nodeid = m.group('nodeid')
162 title = m.group('title').strip() 163 title = m.group('title').strip()
163 subject_args = m.group('args') 164 subject_args = m.group('args')
164 cl = self.db.getclass(classname) 165 cl = self.db.getclass(classname)
332 l.append(section) 333 l.append(section)
333 return summary, '\n'.join(l) 334 return summary, '\n'.join(l)
334 335
335 # 336 #
336 # $Log: not supported by cvs2svn $ 337 # $Log: not supported by cvs2svn $
338 # Revision 1.10 2001/08/07 00:24:42 richard
339 # stupid typo
340 #
337 # Revision 1.9 2001/08/07 00:15:51 richard 341 # Revision 1.9 2001/08/07 00:15:51 richard
338 # Added the copyright/license notice to (nearly) all files at request of 342 # Added the copyright/license notice to (nearly) all files at request of
339 # Bizar Software. 343 # Bizar Software.
340 # 344 #
341 # Revision 1.8 2001/08/05 07:06:07 richard 345 # Revision 1.8 2001/08/05 07:06:07 richard

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