File: general.py

package info (click to toggle)
devolo-home-control-api 0.19.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 804 kB
  • sloc: python: 3,167; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""General exceptions."""


class WrongCredentialsError(Exception):
    """Wrong credentials were used."""

    def __init__(self) -> None:
        """Initialize error."""
        super().__init__("Wrong username or password.")


class WrongUrlError(Exception):
    """Wrong URL was used."""

    def __init__(self, url: str) -> None:
        """Initialize error."""
        super().__init__(f"Wrong URL: {url}")