Skip to content

Commit

Permalink
Add error message/details for failure to import 'lxml'
Browse files Browse the repository at this point in the history
  • Loading branch information
pwt committed Jul 25, 2022
1 parent 7003c78 commit f76efb0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion soco/zonegroupstate.py
Expand Up @@ -61,9 +61,25 @@
"""
import logging
import sys
import time

from lxml import etree as LXML
# pylint: disable=I1101
try:
from lxml import etree as LXML

except ImportError:
print(
"""
SoCo Error: Import of dependency 'lxml' failed. Please install it.
Depending on your platform you may also need to install
system libraries 'libxml2' and 'libxslt'.
Please refer to: https://lxml.de/installation.html for more details.
"""
)
sys.exit(1)

from . import config
from .groups import ZoneGroup
Expand Down

0 comments on commit f76efb0

Please sign in to comment.