Skip to content

Commit 7424b12

Browse files
committed
Moved assignment out of assert statement
1 parent befd307 commit 7424b12

File tree

1 file changed

+2
-2
lines changed
  • micropython/usb/usb-device/usb/device

1 file changed

+2
-2
lines changed

micropython/usb/usb-device/usb/device/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,8 @@ def finish_write(self, nbytes):
830830
# Called by the producer to indicate it wrote nbytes into the buffer.
831831
ist = machine.disable_irq()
832832
try:
833-
assert nbytes <= self._l - (_w := self._w) # can't say we wrote more than was pended
834-
if self._n == _w:
833+
assert nbytes <= self._l - self._w # can't say we wrote more than was pended
834+
if self._n == self._w:
835835
# no data was read while the write was happening, so the buffer is already in place
836836
# (this is the fast path)
837837
self._n += nbytes

0 commit comments

Comments
 (0)