Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lint fix for self assignment
  • Loading branch information
PhearZero authored Jul 7, 2021
commit 9bad8700373152aa31127612680da4514e95fd48
4 changes: 1 addition & 3 deletions adafruit_minimqtt/adafruit_minimqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,7 @@ def publish(self, topic, msg, retain=False, qos=0):
msg = str(msg).encode("ascii")
elif isinstance(msg, str):
msg = str(msg).encode("utf-8")
elif isinstance(msg, bytes):
msg = msg
else:
elif not isinstance(msg, bytes):
raise MMQTTException("Invalid message data type.")
if len(msg) > MQTT_MSG_MAX_SZ:
raise MMQTTException("Message size larger than %d bytes." % MQTT_MSG_MAX_SZ)
Expand Down