From 5177b0bd70fedcf82a16eaf8d7a27aa9fc0801c6 Mon Sep 17 00:00:00 2001 From: Helmut Hoffer von Ankershoffen Date: Sun, 29 Dec 2024 19:29:22 +0100 Subject: [PATCH] fix(imaging): more reliable way to check if extra is installed --- src/starbridge/hello/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/starbridge/hello/service.py b/src/starbridge/hello/service.py index 96d78fa..8de1d96 100644 --- a/src/starbridge/hello/service.py +++ b/src/starbridge/hello/service.py @@ -1,7 +1,7 @@ """Handles Hello operations.""" import base64 -import imp +import importlib import io import os @@ -37,7 +37,7 @@ def hello(self, locale: str = "en_US", context: MCPContext | None = None): return "Hallo Welt!" return "Hello World!" - if imp.find_module("cairosvg"): + if importlib.util.find_spec("cairosvg"): @mcp_tool() def bridge(self, context: MCPContext | None = None):