Changeset 151
- Timestamp:
- 03/09/07 11:45:05 (17 years ago)
- Location:
- emailtotracscript/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
emailtotracscript/trunk/ChangeLog
r150 r151 2 2 3 3 * Added some primarily check to catch an error when attachment size 4 is too large, bug #1153 5 Author: Bas van der Vlies 4 is too large, bug #1153 5 Author: Bas van der Vlies 6 7 * Wrap long line into user given length, use_textwrap: 72. Wraps lines 8 greater then 72 chars, #1123 9 Author: Bas van der Vlies & 10 Rainer Sokoll (r.sokoll at intershop dot de) 11 12 * Fixed a dutch spelling, #1295 13 Author: Rainer Sokoll (r.sokoll at intershop dot de) 14 6 15 7 16 2007-03-08 Michel Jouvin <jouvin@lal.in2p3.fr> -
emailtotracscript/trunk/email2trac.py.in
r150 r151 440 440 441 441 if not msg['Subject']: 442 tkt['summary'] = u'( geensubject)'442 tkt['summary'] = u'(No subject)' 443 443 else: 444 444 tkt['summary'] = self.email_to_unicode(msg['Subject']) … … 551 551 552 552 return ('\n'.join(body)) 553 554 555 def wrap_text(str='', width = self.USE_TEXTWRAP, replace_whitespace = False): 556 """ 557 Will break a lines longer then given length into several small lines of size 558 given length 559 """ 560 import textwrap 561 LINESEPARATOR = '\n' 562 return LINESEPARATOR.join(textwrap.fill(s,width) for s in str.split(LINESEPARATOR)) 553 563 554 564 def get_body_text(self, msg): … … 577 587 body_text = self.strip_signature(body_text) 578 588 579 580 589 if self.USE_TEXTWRAP: 581 import textwrap 582 body_text = textwrap.fill( body_text, 583 width = self.USE_TEXTWRAP, 584 replace_whitespace = False ) 590 body_text = self.wrap_text(body_text) 585 591 586 592 # Get contents charset (iso-8859-15 if not defined in mail headers)
Note: See TracChangeset
for help on using the changeset viewer.