catch access to settings file

This commit is contained in:
chrys 2018-03-22 23:50:14 +01:00
parent 73300a920a
commit f98c1b61b6

View File

@ -147,6 +147,8 @@ class settingsManager():
def loadSettings(self, settingConfigPath): def loadSettings(self, settingConfigPath):
if not os.path.exists(settingConfigPath): if not os.path.exists(settingConfigPath):
return False return False
if not os.access(settingConfigPath, os.R_OK):
return False
self.env['settings'] = ConfigParser() self.env['settings'] = ConfigParser()
self.env['settings'].read(settingConfigPath) self.env['settings'].read(settingConfigPath)
return True return True