mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Device drivers: Ignore corrupted metadata.calibre, instead of raising an error
This commit is contained in:
parent
6ec107a928
commit
206af4c041
@ -166,7 +166,7 @@ class USBMS(CLI, Device):
|
||||
|
||||
# make a dict cache of paths so the lookup in the loop below is faster.
|
||||
bl_cache = {}
|
||||
for idx,b in enumerate(bl):
|
||||
for idx, b in enumerate(bl):
|
||||
bl_cache[b.lpath] = idx
|
||||
|
||||
all_formats = self.formats_to_scan_for()
|
||||
|
@ -161,7 +161,9 @@ class JsonCodec(object):
|
||||
try:
|
||||
js = json.load(file_, encoding='utf-8')
|
||||
for item in js:
|
||||
booklist.append(self.raw_to_book(item, book_class, prefix))
|
||||
entry = self.raw_to_book(item, book_class, prefix)
|
||||
if entry is not None:
|
||||
booklist.append(entry)
|
||||
except:
|
||||
print 'exception during JSON decode_from_file'
|
||||
traceback.print_exc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user