Skip to content

Commit 923b791

Browse files
committed
fix leading underscore constants in DNS module
1 parent 3b94367 commit 923b791

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_dns.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ class IN answer.
167167
pointer += 1
168168
break
169169
# Check for a type A answer.
170-
if int.from_bytes(response[pointer : pointer + 2], "big") == TYPE_A:
170+
if int.from_bytes(response[pointer : pointer + 2], "big") == _TYPE_A:
171171
# Check for an IN class answer.
172172
if (
173173
int.from_bytes(response[pointer + 2 : pointer + 4], "big")
174-
== CLASS_IN
174+
== _CLASS_IN
175175
):
176176
_debug_print(
177177
debug=debug,
@@ -184,11 +184,11 @@ class IN answer.
184184
# Confirm that the resource record is 4 bytes (an IPv4 address).
185185
if (
186186
int.from_bytes(response[pointer : pointer + 2], "big")
187-
== DATA_LEN
187+
== _DATA_LEN
188188
):
189189
ipv4 = response[pointer + 2 : pointer + 6]
190190
# Low probability that the response was truncated inside the 4 byte address.
191-
if len(ipv4) != DATA_LEN:
191+
if len(ipv4) != _DATA_LEN:
192192
raise ValueError("IPv4 address is not 4 bytes.")
193193
_debug_print(
194194
debug=debug,

0 commit comments

Comments
 (0)