Skip to content

Commit eecbb58

Browse files
authored
Lint fix for self assignment
1 parent 2ac1985 commit eecbb58

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,7 @@ def publish(self, topic, msg, retain=False, qos=0):
572572
msg = str(msg).encode("ascii")
573573
elif isinstance(msg, str):
574574
msg = str(msg).encode("utf-8")
575-
elif isinstance(msg, bytes):
576-
msg = msg
577-
else:
575+
elif not isinstance(msg, bytes):
578576
raise MMQTTException("Invalid message data type.")
579577
if len(msg) > MQTT_MSG_MAX_SZ:
580578
raise MMQTTException("Message size larger than %d bytes." % MQTT_MSG_MAX_SZ)

0 commit comments

Comments
 (0)