mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-24 13:47:05 +00:00
handle cancellation
This commit is contained in:
parent
e0c614cf62
commit
8868c9b70d
@ -165,6 +165,7 @@ class TPLinkSmartHomeProtocol:
|
|||||||
self.host,
|
self.host,
|
||||||
ex,
|
ex,
|
||||||
)
|
)
|
||||||
|
raise
|
||||||
|
|
||||||
try:
|
try:
|
||||||
assert self.reader is not None # noqa: S101
|
assert self.reader is not None # noqa: S101
|
||||||
@ -188,6 +189,7 @@ class TPLinkSmartHomeProtocol:
|
|||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"BaseException during query, closing connection: %s", self.host, ex
|
"BaseException during query, closing connection: %s", self.host, ex
|
||||||
)
|
)
|
||||||
|
raise
|
||||||
|
|
||||||
# make mypy happy, this should never be reached..
|
# make mypy happy, this should never be reached..
|
||||||
await self.close()
|
await self.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user