diff src/plugins/plugin_misc_text_syntaxes.py @ 1542:94901070478e

plugins: added new MissingModule exceptions to plugins using third party modules
author Goffi <goffi@goffi.org>
date Wed, 30 Sep 2015 17:25:09 +0200
parents 832846fefe85
children d17772b0fe22
line wrap: on
line diff
--- a/src/plugins/plugin_misc_text_syntaxes.py	Wed Sep 30 17:24:21 2015 +0200
+++ b/src/plugins/plugin_misc_text_syntaxes.py	Wed Sep 30 17:25:09 2015 +0200
@@ -24,8 +24,11 @@
 from twisted.internet import defer
 from twisted.internet.threads import deferToThread
 from sat.core import exceptions
-from lxml import html
-from lxml.html import clean
+try:
+    from lxml import html
+    from lxml.html import clean
+except ImportError:
+    raise exceptions.MissingModule(u"Missing module lxml, please download/install it from http://lxml.de/")
 from cgi import escape
 import re