mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-31 08:39:34 +00:00
Until now get_dcs method was doing absolutely the same job as method from Patroni class. In addition to that I did small refactoring and clean up of unit tests
26 lines
498 B
Python
26 lines
498 B
Python
class PatroniException(Exception):
|
|
|
|
"""Parent class for all kind of exceptions related to selected distributed configuration store"""
|
|
|
|
def __init__(self, value):
|
|
self.value = value
|
|
|
|
def __str__(self):
|
|
"""
|
|
>>> str(PatroniException('foo'))
|
|
"'foo'"
|
|
"""
|
|
return repr(self.value)
|
|
|
|
|
|
class PostgresException(PatroniException):
|
|
pass
|
|
|
|
|
|
class DCSError(PatroniException):
|
|
pass
|
|
|
|
|
|
class PostgresConnectionException(PostgresException):
|
|
pass
|