--- a/MqttMonitor/MqttProtocols.py Thu Dec 30 16:36:40 2021 +0100 +++ b/MqttMonitor/MqttProtocols.py Wed Sep 21 09:42:33 2022 +0200 @@ -16,15 +16,18 @@ """ Class defining the supported MQTT protocol versions. """ + MQTTv31 = mqtt.MQTTv31 MQTTv311 = mqtt.MQTTv311 MQTTv5 = mqtt.MQTTv5 + except ImportError: # define the enum with known values class MqttProtocols(enum.IntEnum): """ Class defining the supported MQTT protocol versions. """ + MQTTv31 = 3 MQTTv311 = 4 MQTTv5 = 5