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

18 lines
607 B
Python
Raw Normal View History

2023-02-11 18:37:07 +00:00
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")