Changeset 490 for trunk/email2trac.py.in


Ignore:
Timestamp:
11/03/10 16:18:56 (13 years ago)
Author:
bas
Message:

email2trac.py.in:

  • renamed function body_text() to get_body_text()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r489 r490  
    509509                message_parts = self.get_message_parts(message)
    510510                message_parts = self.unique_attachment_names(message_parts)
    511                 body_text = self.body_text(message_parts)
     511                body_text = self.get_body_text(message_parts)
    512512                self.debug_body(body_text, True)
    513513                self.debug_attachments(message_parts)
     
    869869                        message_parts.insert(0, self.email_header_txt(m))
    870870
    871                 body_text = self.body_text(message_parts)
     871                body_text = self.get_body_text(message_parts)
    872872
    873873                error_with_attachments = self.attach_attachments(message_parts)
     
    10591059                        message_parts.insert(0, head)
    10601060                       
    1061                 body_text = self.body_text(message_parts)
     1061                body_text = self.get_body_text(message_parts)
    10621062
    10631063                tkt['description'] = body_text
     
    12231223
    12241224                        message_parts = self.get_message_parts(m)
    1225                         comment.comment = self.body_text(message_parts)
     1225                        comment.comment = self.get_body_text(message_parts)
    12261226
    12271227                        blog.create_comment(req, comment)
     
    12391239
    12401240                        message_parts = self.get_message_parts(m)
    1241                         post.body = self.body_text(message_parts)
     1241                        post.body = self.get_body_text(message_parts)
    12421242                       
    12431243                        blog.create_post(req, post, self.author, u'Created by email2trac', False)
     
    12741274                                 'author' : self.author,
    12751275                                 'subscribers' : [self.email_addr],
    1276                                  'body' : self.body_text(context.content_parts)}
     1276                                 'body' : self.get_body_text(context.content_parts)}
    12771277
    12781278                ## Add topic to DB and commit it.
     
    13091309                                   'time' : to_timestamp(datetime.now(utc)),
    13101310                                   'author' : self.author,
    1311                                    'body' : self.body_text(context.content_parts)}
     1311                                   'body' : self.get_body_text(context.content_parts)}
    13121312
    13131313                ## Add message to DB and commit it.
     
    13441344                                   'time' : to_timestamp(datetime.now(utc)),
    13451345                                   'author' : self.author,
    1346                                    'body' : self.body_text(context.content_parts)}
     1346                                   'body' : self.get_body_text(context.content_parts)}
    13471347
    13481348                ## Add message to DB and commit it.
     
    19551955########## TRAC Ticket Text ###########################################################
    19561956                       
    1957         def body_text(self, message_parts):
     1957        def get_body_text(self, message_parts):
    19581958                body_text = []
    19591959               
     
    19661966                                body_text.append("")
    19671967                                continue
    1968                                
     1968
    19691969                        (original, filename, part) = part
    19701970                        inline = self.inline_part(part)
     
    19781978                                        body_text.append('[attachment:"%s"]' % filename)
    19791979                                body_text.append("")
    1980                                
     1980
    19811981                body_text = '\r\n'.join(body_text)
    19821982                return body_text
Note: See TracChangeset for help on using the changeset viewer.