forked from M-Labs/thermostat
More elegant exception rethrow
This commit is contained in:
parent
757fd1689a
commit
f76b414426
@ -38,8 +38,8 @@ class Client:
|
||||
self.timeout = timeout
|
||||
try:
|
||||
self._reader, self._writer = await self._connecting_task
|
||||
except asyncio.CancelledError:
|
||||
raise StoppedConnecting
|
||||
except asyncio.CancelledError as exc:
|
||||
raise StoppedConnecting from exc
|
||||
finally:
|
||||
self._connecting_task = None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user