parent
fdd6229179
commit
89d7490bf1
|
@ -851,7 +851,7 @@ def _load_config_rule_file():
|
||||||
loaded_rules = []
|
loaded_rules = []
|
||||||
if _path.isfile(_file_path):
|
if _path.isfile(_file_path):
|
||||||
try:
|
try:
|
||||||
with open(_file_path, 'r') as config_file:
|
with open(_file_path) as config_file:
|
||||||
loaded_rules = []
|
loaded_rules = []
|
||||||
for loaded_rule in _yaml_safe_load_all(config_file):
|
for loaded_rule in _yaml_safe_load_all(config_file):
|
||||||
rule = Rule(loaded_rule, source=_file_path)
|
rule = Rule(loaded_rule, source=_file_path)
|
||||||
|
|
|
@ -45,7 +45,7 @@ def _load():
|
||||||
if _path.isfile(_file_path):
|
if _path.isfile(_file_path):
|
||||||
loaded_configuration = {}
|
loaded_configuration = {}
|
||||||
try:
|
try:
|
||||||
with open(_file_path, 'r') as config_file:
|
with open(_file_path) as config_file:
|
||||||
loaded_configuration = _json_load(config_file)
|
loaded_configuration = _json_load(config_file)
|
||||||
except Exception:
|
except Exception:
|
||||||
_log.error('failed to load from %s', _file_path)
|
_log.error('failed to load from %s', _file_path)
|
||||||
|
|
Loading…
Reference in New Issue