diff --git a/tavern/_core/plugins.py b/tavern/_core/plugins.py index 27d0f18b..68038550 100644 --- a/tavern/_core/plugins.py +++ b/tavern/_core/plugins.py @@ -108,7 +108,11 @@ def enabled(current_backend, ext): backends = ["http"] - if importlib.util.find_spec("paho.mqtt") is not None: + try: + importlib.util.find_spec("paho.mqtt") + except ModuleNotFoundError: + pass + else: backends.append("mqtt") for backend in backends: