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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy