Don't show CancelledError when logging out early

This commit is contained in:
miruka 2020-03-15 16:13:58 -04:00
parent beac0ce3dd
commit 73d54b5788

View File

@ -213,6 +213,9 @@ class MatrixClient(nio.AsyncClient):
def on_profile_response(future) -> None:
"""Update our model `Account` with the received profile details."""
if future.cancelled(): # Account logged out
return
exception = future.exception()
if exception:
@ -232,6 +235,9 @@ class MatrixClient(nio.AsyncClient):
def on_server_config_response(future) -> None:
"""Update our model `Account` with the received config details."""
if future.cancelled(): # Account logged out
return
exception = future.exception()
if exception: