Skip to content

Commit 8b02630

Browse files
committed
remove stray assert False in order to fix #27
If I understand the comment in the while loop correctly, the purpose of the while loop here is to throw away everything which is sent by the sender to empty the UART buffer, and wait until a timeout occurs (`if data is None`, i.e. everything is sent, end of the current packet). However, due to the `assert`, the loop terminates after the first byte, unless it timeouts (which will most probably not be the case on current connections). Fixes #27
1 parent 8897636 commit 8b02630

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

xmodem/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ def recv(self, stream, crc_mode=1, retry=16, timeout=60, delay=1, quiet=0):
560560
data = self.getc(1, timeout=1)
561561
if data is None:
562562
break
563-
assert False, data
564563
self.putc(NAK)
565564
# get next start-of-header byte
566565
char = self.getc(1, timeout)

0 commit comments

Comments
 (0)