Skip to content

Commit e102693

Browse files
committed
Ensure consistency in use of _raw variable
1 parent 09bfe55 commit e102693

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

digi/xbee/packets/network.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,16 @@ def create_packet(raw, operating_mode):
8989
if operating_mode != OperatingMode.ESCAPED_API_MODE and operating_mode != OperatingMode.API_MODE:
9090
raise InvalidOperatingModeException(operating_mode.name + " is not supported.")
9191

92-
raw = XBeeAPIPacket._unescape_data(raw) if operating_mode == OperatingMode.ESCAPED_API_MODE else raw
92+
_raw = XBeeAPIPacket._unescape_data(raw) if operating_mode == OperatingMode.ESCAPED_API_MODE else raw
9393

94-
XBeeAPIPacket._check_api_packet(raw, min_length=RXIPv4Packet.__MIN_PACKET_LENGTH)
94+
XBeeAPIPacket._check_api_packet(_raw, min_length=RXIPv4Packet.__MIN_PACKET_LENGTH)
9595

96-
if raw[3] != ApiFrameType.RX_IPV4.code:
96+
if _raw[3] != ApiFrameType.RX_IPV4.code:
9797
raise InvalidPacketException("This packet is not an RXIPv4Packet.")
9898

99-
return RXIPv4Packet(IPv4Address(bytes(raw[4:8])), utils.bytes_to_int(raw[8:10]),
100-
utils.bytes_to_int(raw[10:12]), IPProtocol.get(raw[12]),
101-
raw[14:-1])
99+
return RXIPv4Packet(IPv4Address(bytes(_raw[4:8])), utils.bytes_to_int(_raw[8:10]),
100+
utils.bytes_to_int(_raw[10:12]), IPProtocol.get(_raw[12]),
101+
_raw[14:-1])
102102

103103
def needs_id(self):
104104
"""

0 commit comments

Comments
 (0)