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:
Kovid Goyal 2014-06-05 09:28:20 +05:30
parent ef8f3e006c
commit 8d46b4647e

View File

@ -48,6 +48,7 @@ class XMLParseError(BaseError):
' "do the wrong thing".')
def __init__(self, msg, *args, **kwargs):
msg = msg or ''
BaseError.__init__(self, 'Parsing failed: ' + msg, *args, **kwargs)
m = mismatch_pat.search(msg)
if m is not None: