mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-04 18:35:24 +01:00
SONY driver: Nicer error message when SONY XML db is corrupted
This commit is contained in:
parent
e7bf395f0b
commit
661b72e017
1 changed files with 4 additions and 0 deletions
|
|
@ -89,6 +89,10 @@ def __init__(self, paths, prefixes, use_author_sort):
|
|||
raw, strip_encoding_pats=True, assume_utf8=True,
|
||||
verbose=DEBUG)[0],
|
||||
parser=parser)
|
||||
if self.roots[source_id] is None:
|
||||
raise Exception(('The SONY database at %s is corrupted. Try '
|
||||
' disconnecting and reconnecting your reader.')%path)
|
||||
|
||||
# }}}
|
||||
|
||||
recs = self.roots[0].xpath('//*[local-name()="records"]')
|
||||
|
|
|
|||
Loading…
Reference in a new issue