mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 07:35:37 +01:00
Embedded content server: Ignore corrupted settings files
This commit is contained in:
parent
d8d1d890ea
commit
e5b034b8c5
1 changed files with 3 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
import errno
|
||||
import json
|
||||
import os
|
||||
from contextlib import suppress
|
||||
from threading import Thread
|
||||
|
||||
from calibre import as_unicode
|
||||
|
|
@ -32,7 +33,8 @@ def read_json(path):
|
|||
if err.errno != errno.ENOENT:
|
||||
raise
|
||||
return
|
||||
return json.loads(raw)
|
||||
with suppress(json.JSONDecodeError):
|
||||
return json.loads(raw)
|
||||
|
||||
|
||||
def custom_list_template():
|
||||
|
|
|
|||
Loading…
Reference in a new issue