mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-08 16:38:01 +00:00
Fix httpclient exceptions on read and improve error info (#655)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""python-kasa exceptions."""
|
||||
from asyncio import TimeoutError
|
||||
from enum import IntEnum
|
||||
from typing import Optional
|
||||
|
||||
@@ -27,9 +28,15 @@ class RetryableException(SmartDeviceException):
|
||||
"""Retryable exception for device errors."""
|
||||
|
||||
|
||||
class TimeoutException(SmartDeviceException):
|
||||
class TimeoutException(SmartDeviceException, TimeoutError):
|
||||
"""Timeout exception for device errors."""
|
||||
|
||||
def __repr__(self):
|
||||
return SmartDeviceException.__repr__(self)
|
||||
|
||||
def __str__(self):
|
||||
return SmartDeviceException.__str__(self)
|
||||
|
||||
|
||||
class ConnectionException(SmartDeviceException):
|
||||
"""Connection exception for device errors."""
|
||||
|
Reference in New Issue
Block a user