Skip to content

Commit

Permalink
crlf -> lf
Browse files Browse the repository at this point in the history
  • Loading branch information
Bongjun Hur committed Apr 21, 2021
1 parent 93399f6 commit baca531
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion adafruit_wiznet5k/adafruit_wiznet5k.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def set_dhcp(self, hostname=None, response_timeout=3):
# to avoid the code during DHCP - assert self.link_status, "Ethernet cable disconnected!"
start_time = time.monotonic()
while True:
if self.link_status or ((time.monotonic() - start_time) > 5) :
if self.link_status or ((time.monotonic() - start_time) > 5):
break
time.sleep(1)
if self._debug:
Expand Down
4 changes: 2 additions & 2 deletions adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ def send_dhcp_message(self, state, time_elapsed):
:param float time_elapsed: Number of seconds elapsed since renewal.
"""
# before making send packet, shoule init _BUFF.
# before making send packet, shoule init _BUFF.
# if not, DHCP sometimes fails, wrong padding, garbage bytes, ...
_BUFF[:] = b'\x00' * len(_BUFF)
_BUFF[:] = b"\x00" * len(_BUFF)

# OP
_BUFF[0] = DHCP_BOOT_REQUEST
Expand Down
4 changes: 2 additions & 2 deletions examples/wiznet5k_simpleserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
conn, addr = server.accept() # Wait for a connection from a client.
while True:
with conn:
data = conn.recv(1024)
if data: # Wait for receiving data
data = conn.recv(1024)
if data: # Wait for receiving data
print(data)
conn.send(data) # Echo message back to client

0 comments on commit baca531

Please sign in to comment.