Changeset 20:bf238ca0c37f in mailjam for mailjam/config.py


Ignore:
Timestamp:
May 22, 2012, 1:28:15 PM (12 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Fixed multiple bugs found while doing manual tests of both the server and
MTA client. All of those bugs are related to how configuration files are
loaded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mailjam/config.py

    r16 r20  
    4242                'mailing_lists', 'members']
    4343   
    44     def validate_configfile(self):       
     44    def validate_configfile(self):
    4545        if self.configfile:
     46            # ensure we have the full path to the provided file
     47            self.configfile = os.path.join(os.path.dirname(__file__),
     48                                           self.configfile)
    4649            if not os.path.exists(self.configfile):
    4750                # the file does not exist, so we override it with None,
     
    4952                # config file on the usual places
    5053                self.configfile = None
     54            else:
     55                return self.configfile
    5156           
    5257        if not self.configfile:
     
    5661                    self.configfile = full_path
    5762                    return full_path
    58                
     63
    5964        # if we reach here, self.configfile will be still None, no valid
    6065        # config files were found, and so we raise an exception
Note: See TracChangeset for help on using the changeset viewer.