mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix calibre-debug --reinit-db
This commit is contained in:
parent
00f8528d1b
commit
a4cbe12a43
@ -19,8 +19,6 @@ from calibre.utils.date import EPOCH, utcnow
|
||||
from .pool import Pool
|
||||
from .schema_upgrade import SchemaUpgrade
|
||||
|
||||
# TODO: check that switching libraries with indexing enabled/disabled works
|
||||
# TODO: db dump+restore
|
||||
# TODO: calibre export/import should preserve indexed data
|
||||
# TODO: check library and vacuuming of fts db
|
||||
|
||||
|
@ -146,7 +146,7 @@ def reinit_db(dbpath):
|
||||
last_restore_error = None
|
||||
try:
|
||||
dest.execute(statement)
|
||||
except sqlite3.OperationalError as e:
|
||||
except (sqlite3.OperationalError, sqlite3.IntegrityError) as e:
|
||||
last_restore_error = as_unicode(e)
|
||||
# The dump produces an extra commit at the end, so
|
||||
# only print this error if there are more
|
||||
|
Loading…
x
Reference in New Issue
Block a user