We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58cd9e6 commit 1347bbeCopy full SHA for 1347bbe
adafruit_bluefruit_connect/packet.py
@@ -75,7 +75,7 @@ def from_bytes(cls, packet):
75
raise ValueError("Packet too short")
76
packet_class = cls._type_to_class.get(packet[0:2], None)
77
if not packet_class:
78
- raise ValueError("Unregistered packet type {}".format(header))
+ raise ValueError("Unregistered packet type {}".format(packet[0:2]))
79
80
# In case this was called from a subclass, make sure the parsed
81
# type matches up with the current class.
@@ -117,7 +117,7 @@ def from_stream(cls, stream):
117
# Timeout: nothing more read.
118
return None
119
else:
120
- break;
+ break
121
# Didn't find a packet start. Loop and try again.
122
123
header = start + packet_type
0 commit comments