mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
SONY driver: Nicer error message when SONY XML db is corrupted
This commit is contained in:
parent
e7bf395f0b
commit
661b72e017
@ -89,6 +89,10 @@ class XMLCache(object):
|
|||||||
raw, strip_encoding_pats=True, assume_utf8=True,
|
raw, strip_encoding_pats=True, assume_utf8=True,
|
||||||
verbose=DEBUG)[0],
|
verbose=DEBUG)[0],
|
||||||
parser=parser)
|
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"]')
|
recs = self.roots[0].xpath('//*[local-name()="records"]')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user