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