1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
1818
19- '''
19+ """
2020An e-mail gateway for Roundup.
2121
2222Incoming messages are examined for multiple parts:
@@ -73,8 +73,8 @@ class node. Any parts of other types are each stored in separate files
7373an exception, the original message is bounced back to the sender with the
7474explanatory message given in the exception.
7575
76- $Id: mailgw.py,v 1.126 2003-06-25 08:02:51 neaj Exp $
77- '''
76+ $Id: mailgw.py,v 1.127 2003-09-05 20:56:39 jlgijsbers Exp $
77+ """
7878
7979import string , re , os , mimetools , cStringIO , smtplib , socket , binascii , quopri
8080import time , random , sys
@@ -94,7 +94,7 @@ class MailUsageHelp(Exception):
9494 pass
9595
9696class MailLoop (Exception ):
97- ''' We've seen this message before... '''
97+ """ We've seen this message before... """
9898 pass
9999
100100class Unauthorized (Exception ):
@@ -215,23 +215,23 @@ def __init__(self, instance, db, arguments={}):
215215 self .trapExceptions = 1
216216
217217 def do_pipe (self ):
218- ''' Read a message from standard input and pass it to the mail handler.
218+ """ Read a message from standard input and pass it to the mail handler.
219219
220220 Read into an internal structure that we can seek on (in case
221221 there's an error).
222222
223223 XXX: we may want to read this into a temporary file instead...
224- '''
224+ """
225225 s = cStringIO .StringIO ()
226226 s .write (sys .stdin .read ())
227227 s .seek (0 )
228228 self .main (s )
229229 return 0
230230
231231 def do_mailbox (self , filename ):
232- ''' Read a series of messages from the specified unix mailbox file and
232+ """ Read a series of messages from the specified unix mailbox file and
233233 pass each to the mail handler.
234- '''
234+ """
235235 # open the spool file and lock it
236236 import fcntl
237237 # FCNTL is deprecated in py2.3 and fcntl takes over all the symbols
@@ -314,14 +314,14 @@ def main(self, fp):
314314 return self .handle_Message (Message (fp ))
315315
316316 def handle_Message (self , message ):
317- ''' Handle an RFC822 Message
317+ """ Handle an RFC822 Message
318318
319319 Handle the Message object by calling handle_message() and then cope
320320 with any errors raised by handle_message.
321321 This method's job is to make that call and handle any
322322 errors in a sane manner. It should be replaced if you wish to
323323 handle errors in a different manner.
324- '''
324+ """
325325 # in some rare cases, a particularly stuffed-up e-mail will make
326326 # its way into here... try to handle it gracefully
327327 sendto = message .getaddrlist ('from' )
@@ -523,19 +523,19 @@ def handle_message(self, message):
523523 m = None
524524
525525 if not m :
526- raise MailUsageError , '''
526+ raise MailUsageError , """
527527The message you sent to roundup did not contain a properly formed subject
528528line. The subject must contain a class name or designator to indicate the
529- " topic" of the message. For example:
529+ ' topic' of the message. For example:
530530 Subject: [issue] This is a new issue
531- - this will create a new issue in the tracker with the title " This is
532- a new issue" .
531+ - this will create a new issue in the tracker with the title ' This is
532+ a new issue' .
533533 Subject: [issue1234] This is a followup to issue 1234
534534 - this will append the message's contents to the existing issue 1234
535535 in the tracker.
536536
537- Subject was: "%s"
538- ''' % subject
537+ Subject was: '%s'
538+ """ % subject
539539
540540 # get the class
541541 try :
0 commit comments