Changeset 2421

Show
Ignore:
Timestamp:
09/04/05 22:38:43 (19 years ago)
Author:
jerome
Message:

Clearer error message when pykota.conf can't be read.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/config.py

    r2418 r2421  
    4444        self.filename = os.path.join(directory, "pykota.conf") 
    4545        self.adminfilename = os.path.join(directory, "pykotadmin.conf") 
    46         if not os.path.isfile(self.filename) : 
    47             raise PyKotaConfigError, _("Configuration file %s not found.") % self.filename 
     46        if not os.access(self.filename, os.R_OK) : 
     47            raise PyKotaConfigError, _("Configuration file %s can't be read. Please check that the file exists and that your permissions are sufficient.") % self.filename 
    4848        if not os.path.isfile(self.adminfilename) : 
    4949            raise PyKotaConfigError, _("Configuration file %s not found.") % self.adminfilename