Remove redundant value

Opening read-only is the default.
This commit is contained in:
Hugo Osvaldo Barrera 2021-10-30 19:40:28 +02:00 committed by Peter F. Patel-Schneider
parent fdd6229179
commit 89d7490bf1
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)