diff --git a/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py b/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py index 503d1c6..f7c0301 100755 --- a/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py +++ b/aws-iot-device-sdk-python-master/AWSIoTPythonSDK/core/protocol/paho/client.py @@ -1710,7 +1710,7 @@ def _topic_wildcard_len_check(self, topic): # Search for + or # in a topic. Return MQTT_ERR_INVAL if found. # Also returns MQTT_ERR_INVAL if the topic string is too long. # Returns MQTT_ERR_SUCCESS if everything is fine. - if '+' in topic or '#' in topic or len(topic) == 0 or len(topic) > 65535: + if not topic or '+' in topic or '#' in topic or len(topic) > 65535: return MQTT_ERR_INVAL else: return MQTT_ERR_SUCCESS