Merge pull request #565 from MISP/fix-force-utf8-on-read

fix: [abstract] Forces file to be read with utf8 encoding
pull/567/head
Raphaël Vinot 2020-04-24 23:58:08 +02:00 committed by GitHub
commit 1be38cf30a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class MISPFileCache(object):
def _load_json(path: Path) -> Union[dict, None]:
if not path.exists():
return None
with path.open('r') as f:
with path.open('r', encoding='utf-8') as f:
if HAS_RAPIDJSON:
data = load(f)
else: