[merge] Check on existence of the -c specified config file by Christophe Chauvet
bzr revid: xmo@tinyerp.com-20100202074415-0yikzl1w72cdtf6h
This commit is contained in:
commit
958d3c556c
|
@ -205,6 +205,11 @@ class configmanager(object):
|
|||
die(opt.translate_out and (not opt.db_name),
|
||||
"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, "\
|
||||
"use -s/--save if you want to generate it"%(opt.config))
|
||||
|
||||
# place/search the config file on Win32 near the server installation
|
||||
# (../etc from the server)
|
||||
# if the server is run by an unprivileged user, he has to specify location of a config file where he has the rights to write,
|
||||
|
|
Loading…
Reference in New Issue