plugin text syntaxes: update exception message to be more explicit when lxml_html_clean is missing.

This commit is contained in:
Goffi 2024-11-20 11:30:43 +01:00
commit 8443ddac65

View file

@ -33,11 +33,18 @@ from libervia.backend.tools import xml_tools
try:
from lxml import html
from lxml.html import clean
from lxml import etree
except ImportError:
raise exceptions.MissingModule(
"Missing module lxml, please download/install it from http://lxml.de/"
'Missing module "lxml", please download/install it from http://lxml.de/'
)
try:
from lxml.html import clean
except ImportError:
raise exceptions.MissingModule(
'Missing module "lxml_html_clean". Please download and install it from '
'http://lxml.de/. Note that this is a separate package to install in addition '
'to "lxml".'
)
log = getLogger(__name__)