Skip to content

Commit

Permalink
catch error
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Jan 18, 2024
1 parent 84a3ca3 commit 1b61341
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tavern/_core/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1b61341

Please sign in to comment.