Changeset 604
- Timestamp:
- 08/30/12 13:55:54 (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r603 r604 30 30 Reported by: Anonymous 31 31 Fixed by: Bas van der Vlies 32 33 * Added a new option 'only_strip_on_update', default value is False. Only call the functions 34 strip_quotes and strip_signature for ticket updates, closes #192 35 Requested by, Patch: Konstantin Ryabitsev <icon add mricon dot com> 36 Appplied by: Bas van der Vlies 32 37 33 38 2.5.0 -
trunk/email2trac.py.in
r603 r604 220 220 self.parameters.subject_field_separator = self.parameters.subject_field_separator.strip() 221 221 222 #if self.parameters.only_strip_on_update == None: 223 # self.parameters.only_strip_on_update == False: 224 #else: 225 # self.parameters.only_strip_on_update == True: 226 222 227 self.trac_smtp_from = self.get_config('notification', 'smtp_from') 223 228 self.smtp_default_domain = self.get_config('notification', 'smtp_default_domain') … … 979 984 ## Not a valid ticket 980 985 # 986 self.logger.info("\tCreating a new ticket, ticket id: %s does not exists" %id) 981 987 self.id = None 982 988 return False … … 1240 1246 1241 1247 1242 message_parts = self.get_message_parts(msg )1248 message_parts = self.get_message_parts(msg, True) 1243 1249 1244 1250 ## Must we update some ticket fields properties via body_text … … 2008 2014 return part.get_param('inline', None, 'Content-Disposition') == '' or not part.has_key('Content-Disposition') 2009 2015 2010 def get_message_parts(self, msg ):2016 def get_message_parts(self, msg, new_email=False): 2011 2017 """ 2012 2018 parses the email message and returns a list of body parts and attachments … … 2104 2110 if self.parameters.reflow and not self.parameters.verbatim_format and format == 'flowed': 2105 2111 body_text = self.reflow(body_text, delsp == 'yes') 2106 2107 if self.parameters.strip_signature: 2108 body_text = self.strip_signature(body_text) 2109 2110 if self.parameters.strip_quotes: 2111 body_text = self.strip_quotes(body_text) 2112 2113 if new_email and self.parameters.only_strip_on_update: 2114 self.logger.debug('Skip signature/quote stripping for new messages') 2115 else: 2116 if self.parameters.strip_signature: 2117 body_text = self.strip_signature(body_text) 2118 2119 if self.parameters.strip_quotes: 2120 body_text = self.strip_quotes(body_text) 2112 2121 2113 2122 if self.parameters.inline_properties:
Note: See TracChangeset
for help on using the changeset viewer.