Skip to content
Snippets Groups Projects
Commit 5fde889c613f authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:sparkles: local configuration file can now be an argument

parent 7a87a7532f03
No related branches found
No related tags found
No related merge requests found
...@@ -276,6 +276,11 @@ ...@@ -276,6 +276,11 @@
default=None, default=None,
dest='DUMP', dest='DUMP',
) )
parser.add_argument(
'--config',
help="Configuration file to use, if any [default: %(default)s]",
default=os.path.join('conf', 'dev', 'odoo.conf'),
)
# TODO detect that user is member of docker group # TODO detect that user is member of docker group
...@@ -463,8 +468,8 @@ ...@@ -463,8 +468,8 @@
arg.append('%s' % nmspc.dbport) arg.append('%s' % nmspc.dbport)
# auto detect local conf # auto detect local conf
local_conf_dir = os.path.join('conf', 'dev') local_conf_path = nmspc.config
local_conf_path = os.path.join(local_conf_dir, 'odoo.conf') local_conf_dir = os.path.dirname(os.path.realpath(local_conf_path))
user = db_user user = db_user
password = db_password password = db_password
if os.path.isfile(local_conf_path): if os.path.isfile(local_conf_path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment