diff --git a/.gitignore b/.gitignore index bbdb073..77d54a7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ .idea gmqtt.egg-info dist/ - +build/ # virtualenvs env/ venv/ diff --git a/gmqtt/client.py b/gmqtt/client.py index 42b436d..47910b8 100644 --- a/gmqtt/client.py +++ b/gmqtt/client.py @@ -15,7 +15,7 @@ class Message: def __init__(self, topic, payload, qos=0, retain=False, **kwargs): - self.topic = topic.encode('utf-8', errors='replace') if isinstance(topic, str) else str + self.topic = topic.encode('utf-8', errors='replace') if isinstance(topic, str) else topic self.qos = qos self.retain = retain self.dup = False