Use assignment expressions 31 (#58715)
This commit is contained in:
parent
f7dea3aa1d
commit
a48ddcadd4
26 changed files with 27 additions and 58 deletions
|
@ -73,8 +73,7 @@ class WebSocketHandler:
|
|||
# Exceptions if Socket disconnected or cancelled by connection handler
|
||||
with suppress(RuntimeError, ConnectionResetError, *CANCELLATION_ERRORS):
|
||||
while not self.wsock.closed:
|
||||
message = await self._to_write.get()
|
||||
if message is None:
|
||||
if (message := await self._to_write.get()) is None:
|
||||
break
|
||||
|
||||
self._logger.debug("Sending %s", message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue