[IMP] config: Test that the config file is readable

Fixes #3237

cherry-pick of 8e72049
This commit is contained in:
Samus CTO 2014-10-22 11:40:09 +02:00 committed by Christophe Simonis
parent 472291b35c
commit d2fd05ef21
1 changed files with 2 additions and 2 deletions

View File

@ -350,8 +350,8 @@ class configmanager(object):
"the i18n-export option cannot be used without the database (-d) option")
# Check if the config file exists (-c used, but not -s)
die(not opt.save and opt.config and not os.path.exists(opt.config),
"The config file '%s' selected with -c/--config doesn't exist, "\
die(not opt.save and opt.config and not os.access(opt.config, os.R_OK),
"The config file '%s' selected with -c/--config doesn't exist or is not readable, "\
"use -s/--save if you want to generate it"% opt.config)
# place/search the config file on Win32 near the server installation