Changeset 433
- Timestamp:
- 07/22/10 14:00:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/email2trac.py.in
r431 r433 63 63 import string 64 64 import getopt 65 import stat66 65 import time 67 66 import email … … 71 70 import urllib 72 71 import unicodedata 73 from stat import *74 72 import mimetypes 75 73 import traceback … … 77 75 import logging.handlers 78 76 import UserDict 77 79 78 from datetime import tzinfo, timedelta, datetime 79 from stat import * 80 80 81 81 … … 510 510 return 511 511 512 print ' TD:writing body to %s' %(body_file)512 print 'writing body to %s' %(body_file) 513 513 fx = open(body_file, 'wb') 514 514 if not message_body: … … 539 539 540 540 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()) 542 542 543 s = ' TD:part%d: filename: %s' %(n, filename)543 s = 'part%d: filename: %s' %(n, filename) 544 544 self.print_unicode(s) 545 545 … … 551 551 552 552 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) 554 554 self.print_unicode(s) 555 555 … … 586 586 print 'DRY_RUN: NOT saving email message to %s' %(msg_file) 587 587 else: 588 print ' TD:saving email to %s' %(msg_file)588 print 'saving email to %s' %(msg_file) 589 589 590 590 fx = open(msg_file, 'wb') … … 773 773 for field,value in user_dict.items(): 774 774 if self.parameters.debug: 775 s = ' TD:user_field\t %s = %s' %(field,value)775 s = 'user_field\t %s = %s' %(field,value) 776 776 self.print_unicode(s) 777 777 … … 783 783 784 784 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)) 786 786 787 787 cc_list.remove(self.trac_smtp_from) … … 1205 1205 # 1206 1206 stats = os.lstat(path) 1207 file_size = stats[ stat.ST_SIZE]1207 file_size = stats[ST_SIZE] 1208 1208 1209 1209 # Check if the attachment size is allowed … … 1364 1364 from trac.util.datefmt import to_timestamp, utc 1365 1365 1366 self.loggger.debug(' TD:Replying to discussion message', self.id)1366 self.loggger.debug('Replying to discussion message', self.id) 1367 1367 1368 1368 # Get dissussion API component. … … 1848 1848 else: 1849 1849 if self.parameters.debug: 1850 s = ' TD:Filename: %s' % part.get_filename()1850 s = ' Filename: %s' % part.get_filename() 1851 1851 self.print_unicode(s) 1852 1852 … … 1921 1921 1922 1922 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) 1924 1924 self.print_unicode(s) 1925 1925 … … 1934 1934 1935 1935 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) 1937 1937 self.print_unicode(s) 1938 1938
Note: See TracChangeset
for help on using the changeset viewer.