Commit 6a6f0327 authored by Recteur LP's avatar Recteur LP

Config override from /etc/pyrmin/plugin volume

parent d4bf7f5f
Pipeline #1568 passed with stages
in 17 minutes and 38 seconds
......@@ -35,10 +35,14 @@ class Core():
if os.path.exists(config_path):
config = {}
no_file = True
for filename in os.listdir(config_path):
if filename.endswith(".yml"):
config.update(yaml.load(io.open(os.path.join(config_path, filename)), Loader=PrettySafeLoader))
no_file = False
for root, dirs, files in os.walk(config_path):
for filename in files:
if filename.endswith(".yml"):
config.update(yaml.load(
io.open(os.path.join(config_path, root, filename)),
Loader=PrettySafeLoader
))
no_file = False
if not no_file:
config['pyrmin'].update({
"config_path": config_path,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment