Changeset 297 for trunk/email2trac.py.in


Ignore:
Timestamp:
01/07/10 16:49:51 (14 years ago)
Author:
bas
Message:

added a new parameter subject_field_separator default value is &, closes #166

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r296 r297  
    4242    project      : /data/trac/test   # REQUIRED
    4343    debug        : 1                 # OPTIONAL, if set print some DEBUG info
    44     trac_version : 0.9               # OPTIONAL, default is 0.11
     44    trac_version : 0.10              # OPTIONAL, default is 0.11
    4545
    4646    [jouvin]                         # OPTIONAL project declaration, if set both fields necessary
     
    261261                        self.IGNORE_TRAC_USER_SETTINGS = 0
    262262
     263                if parameters.has_key('subject_field_separator'):
     264                        self.SUBJECT_FIELD_SEPARATOR = parameters['subject_field_separator'].strip()
     265                else:
     266                        self.SUBJECT_FIELD_SEPARATOR = '&'
     267
    263268        def spam(self, message):
    264269                """
     
    516521                """
    517522
    518                 fields = string.split(s, ',')
     523                fields = string.split(s, self.SUBJECT_FIELD_SEPARATOR)
    519524
    520525                result = dict()
     
    534539                        except ValueError:
    535540                                pass
    536 
    537541                return result
    538542
Note: See TracChangeset for help on using the changeset viewer.