Changeset 154 for emailtotracscript
- Timestamp:
- 04/24/07 10:28:14 (16 years ago)
- Location:
- emailtotracscript/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/ChangeLog
r152 r154 1 1 2007-XXXXX 2 2 3 * Added some primarilycheck to catch an error when attachment size3 * Added check to catch an error when attachment size 4 4 is too large, bug #1153 5 5 Author: Bas van der Vlies -
emailtotracscript/trunk/email2trac.py.in
r153 r154 554 554 555 555 556 def wrap_text(s tr='', replace_whitespace = False):556 def wrap_text(self, text, replace_whitespace = False): 557 557 """ 558 558 Will break a lines longer then given length into several small lines of size … … 560 560 """ 561 561 import textwrap 562 562 563 LINESEPARATOR = '\n' 563 564 reformat = '' 564 565 565 for s in str.split(LINESEPARATOR): 566 reformat = '%s%s' %(reformat, LINESEPARATOR.join(textwrap.fill(s,self.USE_TEXTWRAP))) 566 for s in text.split(LINESEPARATOR): 567 tmp = textwrap.fill(s,self.USE_TEXTWRAP) 568 if tmp: 569 reformat = '%s\n%s' %(reformat,tmp) 570 else: 571 reformat = '%s\n' %reformat 567 572 568 573 return reformat 574 575 # Python2.4 and higher 576 # 577 #return LINESEPARATOR.join(textwrap.fill(s,width) for s in str.split(LINESEPARATOR)) 578 # 579 569 580 570 581 def get_body_text(self, msg): … … 589 600 if not body_text: 590 601 body_text = part.get_payload(decode=0) 591 602 592 603 if self.STRIP_SIGNATURE: 593 604 body_text = self.strip_signature(body_text)
Note: See TracChangeset
for help on using the changeset viewer.