mirror of
https://github.com/moepman/acertmgr.git
synced 2024-09-27 23:34:46 +02:00
configuration: fix global config file detection
This commit is contained in:
parent
a93b047275
commit
d272f9ada3
@ -192,9 +192,11 @@ def load():
|
|||||||
config = list()
|
config = list()
|
||||||
if os.path.isdir(domain_config_dir):
|
if os.path.isdir(domain_config_dir):
|
||||||
for domain_config_file in os.listdir(domain_config_dir):
|
for domain_config_file in os.listdir(domain_config_dir):
|
||||||
|
domain_config_file = os.path.join(domain_config_dir, domain_config_file)
|
||||||
# check file extension and skip if global config file
|
# check file extension and skip if global config file
|
||||||
if domain_config_file.endswith(".conf") and domain_config_file != global_config_file:
|
if domain_config_file.endswith(".conf") and \
|
||||||
with io.open(os.path.join(domain_config_dir, domain_config_file)) as config_fd:
|
os.path.abspath(domain_config_file) != os.path.abspath(global_config_file):
|
||||||
|
with io.open(domain_config_file) as config_fd:
|
||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
for entry in json.load(config_fd).items():
|
for entry in json.load(config_fd).items():
|
||||||
|
Loading…
Reference in New Issue
Block a user