From 2dff34fab40fed662fec563b67714d955c145556 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Nov 2014 14:21:11 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/text.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index 13cd92be1b..1653ac26d6 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -32,10 +32,10 @@ PARAGRAPH_SEPARATOR = '\u2029' def get_highlighter(syntax): try: - ans = importlib.import_module('calibre.gui2.tweak_book.editor.syntax.' + syntax).Highlighter + return importlib.import_module('calibre.gui2.tweak_book.editor.syntax.' + syntax).Highlighter except (ImportError, AttributeError): - ans = SyntaxHighlighter - return ans + pass + return SyntaxHighlighter def get_smarts(syntax): smartsname = {'xml':'html'}.get(syntax, syntax)