diff --git a/awsiot/__init__.py b/awsiot/__init__.py index fbd5a084..8cd0f3f7 100644 --- a/awsiot/__init__.py +++ b/awsiot/__init__.py @@ -39,7 +39,7 @@ def __init__(self, mqtt_connection: mqtt.Connection or mqtt5.Client): self._mqtt_connection = mqtt_connection.new_connection() self._mqtt5_client = mqtt_connection else: - assert("The service client could only take mqtt.Connection and mqtt5.Client as argument") + raise TypeError("The service client could only take mqtt.Connection and mqtt5.Client as argument") @property def mqtt_connection(self) -> mqtt.Connection: