Changeset 433


Ignore:
Timestamp:
07/22/10 14:00:53 (14 years ago)
Author:
bas
Message:

removed some obsolete code and delete the TD: prefix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r431 r433  
    6363import string
    6464import getopt
    65 import stat
    6665import time
    6766import email
     
    7170import urllib
    7271import unicodedata
    73 from stat import *
    7472import mimetypes
    7573import traceback
     
    7775import logging.handlers
    7876import UserDict
     77
    7978from datetime import tzinfo, timedelta, datetime
     79from stat import *
    8080
    8181
     
    510510                        return
    511511
    512                 print 'TD: writing body to %s' %(body_file)
     512                print 'writing body to %s' %(body_file)
    513513                fx = open(body_file, 'wb')
    514514                if not message_body:
     
    539539
    540540                        n = n + 1
    541                         print 'TD: part%d: Content-Type: %s' % (n, part.get_content_type())
     541                        print 'part%d: Content-Type: %s' % (n, part.get_content_type())
    542542               
    543                         s = 'TD: part%d: filename: %s' %(n, filename)
     543                        s = 'part%d: filename: %s' %(n, filename)
    544544                        self.print_unicode(s)
    545545       
     
    551551
    552552                        part_file = os.path.join(self.TMPDIR, filename)
    553                         s = 'TD: writing part%d (%s)' % (n,part_file)
     553                        s = 'writing part%d (%s)' % (n,part_file)
    554554                        self.print_unicode(s)
    555555
     
    586586                        print 'DRY_RUN: NOT saving email message to %s' %(msg_file)
    587587                else:
    588                         print 'TD: saving email to %s' %(msg_file)
     588                        print 'saving email to %s' %(msg_file)
    589589
    590590                        fx = open(msg_file, 'wb')
     
    773773                for field,value in user_dict.items():
    774774                        if self.parameters.debug:
    775                                 s = 'TD: user_field\t %s = %s' %(field,value)
     775                                s = 'user_field\t %s = %s' %(field,value)
    776776                                self.print_unicode(s)
    777777
     
    783783
    784784                                if self.trac_smtp_from in cc_list:
    785                                         self.logger.debug('TD: MAIL LOOP: %s is not allowed as CC address' %(self.trac_smtp_from))
     785                                        self.logger.debug('MAIL LOOP: %s is not allowed as CC address' %(self.trac_smtp_from))
    786786
    787787                                        cc_list.remove(self.trac_smtp_from)
     
    12051205                        #
    12061206                        stats = os.lstat(path)
    1207                         file_size = stats[stat.ST_SIZE]
     1207                        file_size = stats[ST_SIZE]
    12081208
    12091209                        # Check if the attachment size is allowed
     
    13641364                from trac.util.datefmt import to_timestamp, utc
    13651365
    1366                 self.loggger.debug('TD: Replying to discussion message', self.id)
     1366                self.loggger.debug('Replying to discussion message', self.id)
    13671367
    13681368                # Get dissussion API component.
     
    18481848                        else:
    18491849                                if self.parameters.debug:
    1850                                         s = 'TD:               Filename: %s' % part.get_filename()
     1850                                        s = '              Filename: %s' % part.get_filename()
    18511851                                        self.print_unicode(s)
    18521852
     
    19211921                               
    19221922                        if self.parameters.debug:
    1923                                 s = 'TD: Attachment with filename %s will be saved as %s' % (filename, unique_filename)
     1923                                s = 'Attachment with filename %s will be saved as %s' % (filename, unique_filename)
    19241924                                self.print_unicode(s)
    19251925
     
    19341934
    19351935                if self.parameters.debug:
    1936                         s = 'TD: attachment already exists: Id : %s, Filename : %s' %(self.id, filename)
     1936                        s = 'attachment already exists: Id : %s, Filename : %s' %(self.id, filename)
    19371937                        self.print_unicode(s)
    19381938
Note: See TracChangeset for help on using the changeset viewer.