增加open容错处理

This commit is contained in:
Jing Ling
2020-01-10 15:26:41 +08:00
parent d99cf64ae8
commit 2ff7d45348
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ from common.domain import Domain
def get_fingerprint():
path = config.data_storage_path.joinpath('fingerprints.json')
with open(path) as file:
with open(path, encoding='utf-8', errors='ignore') as file:
fingerprints = json.load(file)
return fingerprints