Changeset 373


Ignore:
Timestamp:
06/09/10 17:12:51 (11 years ago)
Author:
bas
Message:

Some minor code re-arrangements to determine trac version

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/delete_spam.py.in

    r365 r373  
    148148                        VERBOSE = True
    149149
    150         ## trac version is defined like this  X.version.X
     150        # Determine major trac version used to be in email2trac.conf
     151        # Quick hack for 0.12
    151152        #
    152         version = int(trac_version.split('.')[1])
     153        version = '0.%s' %(trac_version.split('.')[1])
     154        if version.startswith('0.12'):
     155                version = '0.12'
     156
    153157        if VERBOSE:
    154158                print "Found trac version: %d" %version
    155159
    156         if version < 10:
     160        ## We only support versions 0.11 and 0.12
     161        #
     162        if not version in ['0.11', '0.12']:
    157163                print 'Trac version %s is not suported' %(version)
    158        
     164
    159165        settings = ReadConfig(configfile, project_name)
    160166        if not settings.has_key('project'):
  • trunk/email2trac.py.in

    r369 r373  
    20442044
    20452045        # Determine major trac version used to be in email2trac.conf
     2046        # Quick hack for 0.12
    20462047        #
    20472048        version = '0.%s' %(trac_version.split('.')[1])
     2049        if version.startswith('0.12'):
     2050                version = '0.12'
     2051
    20482052        if verbose:
    20492053                print "Found trac version: %s" %(version)
     
    20512055        #debug HvB
    20522056        #print settings
    2053 
    2054         # Quick hack for 0.12
    2055         #
    2056         if version.startswith('0.12'):
    2057                 version = '0.12'
    2058                 if verbose:
    2059                         print "Found trac version: %s" %(version)
    20602057
    20612058        try:
Note: See TracChangeset for help on using the changeset viewer.