Fix mypy not catching non-nullability of conn

This commit is contained in:
Luna 2020-04-01 20:01:44 -03:00
parent 133154ad1b
commit 6a74a7f990
1 changed files with 4 additions and 4 deletions

View File

@ -185,11 +185,11 @@ class LVSPConnection:
"""Start the websocket."""
await self.start()
try:
if self.conn is None:
log.error("failed to start lvsp connection, stopping")
return
try:
await self._loop()
except websockets.exceptions.ConnectionClosed as err:
log.warning("conn close, {}, err={}", self._log_id, err)