File: exceptions.py

package info (click to toggle)
python-pykube-ng 22.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: python: 2,336; makefile: 44
file content (29 lines) | stat: -rw-r--r-- 415 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Exceptions.
"""


class KubernetesError(Exception):
    """
    Base exception for all Kubernetes errors.
    """

    pass


class PyKubeError(KubernetesError):
    """
    PyKube specific errors.
    """

    pass


class HTTPError(PyKubeError):
    def __init__(self, code, message):
        super(HTTPError, self).__init__(message)
        self.code = code


class ObjectDoesNotExist(PyKubeError):
    pass