增加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
@@ -226,7 +226,7 @@ class Module(object):
dpath.mkdir(parents=True, exist_ok=True)
name = self.source + '.json'
path = dpath.joinpath(name)
with open(path, mode='w', encoding='utf-8') as file:
with open(path, mode='w', encoding='utf-8', errors='ignore') as file:
result = {'domain': self.domain,
'name': self.module,
'source': self.source,