mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ignore errors when unpickling stored conversion options
This commit is contained in:
parent
79037fcbf1
commit
6906981702
@ -1695,7 +1695,10 @@ class DB(object):
|
|||||||
def conversion_options(self, book_id, fmt):
|
def conversion_options(self, book_id, fmt):
|
||||||
for (data,) in self.conn.get('SELECT data FROM conversion_options WHERE book=? AND format=?', (book_id, fmt.upper())):
|
for (data,) in self.conn.get('SELECT data FROM conversion_options WHERE book=? AND format=?', (book_id, fmt.upper())):
|
||||||
if data:
|
if data:
|
||||||
return unpickle_binary_string(bytes(data))
|
try:
|
||||||
|
return unpickle_binary_string(bytes(data))
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
def has_conversion_options(self, ids, fmt='PIPE'):
|
def has_conversion_options(self, ids, fmt='PIPE'):
|
||||||
ids = frozenset(ids)
|
ids = frozenset(ids)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user