From 41a1b51c318cb825d5449012f31cd7f4cc20e6f4 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Sat, 10 Sep 2016 09:11:26 +0100 Subject: [PATCH] Print warning, skip test if paho-mqtt not available. --- test/broker/03-publish-qos1-queued-bytes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/broker/03-publish-qos1-queued-bytes.py b/test/broker/03-publish-qos1-queued-bytes.py index cf4c58dc..6f60657e 100755 --- a/test/broker/03-publish-qos1-queued-bytes.py +++ b/test/broker/03-publish-qos1-queued-bytes.py @@ -9,8 +9,12 @@ import socket import threading import time -import paho.mqtt.client -import paho.mqtt.publish +try: + import paho.mqtt.client + import paho.mqtt.publish +except ImportError: + print("WARNING: paho.mqtt module not available, skipping byte count test.") + exit(0) import inspect, os, sys