Remove all uses of assignment expressions.

This is needed to port to Python 3.7 because
Raspbian 10 doesn't have Python 3.8.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
This commit is contained in:
Oleg Girko
2020-08-18 03:44:06 +03:00
parent 5307765399
commit 2dbf11428f
9 changed files with 30 additions and 18 deletions

View File

@@ -363,7 +363,8 @@ class RfbClient(RfbClientStream): # pylint: disable=too-many-instance-attribute
}
while True:
msg_type = await self._read_number("B")
if (handler := handlers.get(msg_type)) is not None:
handler = handlers.get(msg_type)
if handler is not None:
await handler() # type: ignore # mypy bug
else:
raise RfbError(f"Unknown message type: {msg_type}")