From 64e09f7ca780aa2128309c9b63c7228b4a02eae9 Mon Sep 17 00:00:00 2001 From: Feike Steenbergen Date: Tue, 22 Dec 2015 15:29:05 +0100 Subject: [PATCH] Patronictl: Prettier error messages by inheriting from ClickException --- patroni/exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patroni/exceptions.py b/patroni/exceptions.py index 43f54e7f..97b88238 100644 --- a/patroni/exceptions.py +++ b/patroni/exceptions.py @@ -1,3 +1,5 @@ +from click import ClickException + class PatroniException(Exception): """Parent class for all kind of exceptions related to selected distributed configuration store""" @@ -13,7 +15,7 @@ class PatroniException(Exception): return repr(self.value) -class PatroniCtlException(Exception): +class PatroniCtlException(ClickException): pass