From 7a27819715886a96a4761f2ed37e87ef18f479e0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Aug 2014 12:52:21 +0530 Subject: [PATCH] Edit Book: Check Book: Do not run the rest of the checks if parsing errors are found, to avoid the checkers from raising unhandled errors --- src/calibre/ebooks/oeb/polish/check/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/oeb/polish/check/main.py b/src/calibre/ebooks/oeb/polish/check/main.py index aa0e2f748c..256c57ac6e 100644 --- a/src/calibre/ebooks/oeb/polish/check/main.py +++ b/src/calibre/ebooks/oeb/polish/check/main.py @@ -52,6 +52,9 @@ def run_checks(container): continue errors.extend(check_css_parsing(name, raw)) + if errors: + return errors + for name, mt, raw in html_items + xml_items: errors.extend(check_encoding_declarations(name, container))