From 8d46b4647eb0c26b957c7cc21a4d1a414a8cb082 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Jun 2014 09:28:20 +0530 Subject: [PATCH] Check Book: Fix empty (zero byte) XML files causing check book to fail. Fixes #1326073 [Private bug](https://bugs.launchpad.net/calibre/+bug/1326073) --- src/calibre/ebooks/oeb/polish/check/parsing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/ebooks/oeb/polish/check/parsing.py b/src/calibre/ebooks/oeb/polish/check/parsing.py index e27345dc2d..72e5894ebb 100644 --- a/src/calibre/ebooks/oeb/polish/check/parsing.py +++ b/src/calibre/ebooks/oeb/polish/check/parsing.py @@ -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: