mirror of
https://github.com/beetbox/beets.git
synced 2025-12-11 11:07:31 +01:00
Detect corrupted database files
This commit is contained in:
parent
e27f778d51
commit
00c8f6ac25
2 changed files with 4 additions and 1 deletions
|
|
@ -888,7 +888,9 @@ def _open_library(config):
|
|||
get_path_formats(),
|
||||
get_replacements(),
|
||||
)
|
||||
except sqlite3.OperationalError:
|
||||
lib.get_item(0) # Test database connection.
|
||||
except (sqlite3.OperationalError, sqlite3.DatabaseError):
|
||||
log.debug(traceback.format_exc())
|
||||
raise UserError(u"database file {0} could not be opened".format(
|
||||
util.displayable_path(dbpath)
|
||||
))
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ New:
|
|||
Fixed:
|
||||
|
||||
* Fix a new crash with the latest version of Mutagen (1.26).
|
||||
* We now print a better error message when the database file is corrupted.
|
||||
|
||||
.. _Plex: https://plex.tv/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue