This repository has been archived on 2023-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
homeassistant-config/deps/lib/python3.10/site-packages/pytapo/media_stream/error.py
darthsandmann d1289421b9 updates
2023-02-11 19:37:07 +01:00

18 lines
607 B
Python

class HttpMediaSessionException(Exception):
pass
class NonceMissingException(HttpMediaSessionException, ValueError):
def __init__(self) -> None:
super().__init__("Nonce is missing from key exchange")
class HttpStatusCodeException(HttpMediaSessionException):
def __init__(self, status_code: int) -> None:
super().__init__("HTTP request returned {} status code".format(status_code))
class KeyExchangeMissingException(HttpMediaSessionException, RuntimeError):
def __init__(self) -> None:
super().__init__("Server reply does not contain the required Key-Exchange")