Fixed social plugin checking dependencies albeit being disabled

This commit is contained in:
squidfunk
2023-08-30 16:28:59 +02:00
parent f2512ded4a
commit ad45cf36cb
4 changed files with 30 additions and 42 deletions

View File

@@ -17,22 +17,3 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import logging
import sys
# -----------------------------------------------------------------------------
# Checks
# -----------------------------------------------------------------------------
# Check for pillow and cairosvg
try:
import cairosvg as _
import PIL as _
except ImportError:
log = logging.getLogger("mkdocs.material.social")
log.error(
"Required dependencies of \"social\" plugin not found. "
"Install with: pip install pillow cairosvg"
)
sys.exit(1)