mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Check Book: Fix empty (zero byte) XML files causing check book to fail. Fixes #1326073 [Private bug](https://bugs.launchpad.net/calibre/+bug/1326073)
This commit is contained in:
parent
ef8f3e006c
commit
8d46b4647e
@ -48,6 +48,7 @@ class XMLParseError(BaseError):
|
|||||||
' "do the wrong thing".')
|
' "do the wrong thing".')
|
||||||
|
|
||||||
def __init__(self, msg, *args, **kwargs):
|
def __init__(self, msg, *args, **kwargs):
|
||||||
|
msg = msg or ''
|
||||||
BaseError.__init__(self, 'Parsing failed: ' + msg, *args, **kwargs)
|
BaseError.__init__(self, 'Parsing failed: ' + msg, *args, **kwargs)
|
||||||
m = mismatch_pat.search(msg)
|
m = mismatch_pat.search(msg)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user