From b476a22f4a85d90ccaec2ee27a528d5bfe428a82 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 8 Jan 2019 09:43:40 +0100 Subject: ssh/lvm/lxc backup wip --- exceptions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 exceptions.py (limited to 'exceptions.py') diff --git a/exceptions.py b/exceptions.py new file mode 100644 index 0000000..8944fe9 --- /dev/null +++ b/exceptions.py @@ -0,0 +1,11 @@ +class RemoteExecException(Exception): + retcode = None + output = None + def __init__(self, explanation, retcode, output): + super().__init__(explanation) + self.retcode = retcode + self.output = output + + def __str__(self): + return (super().__str__() + + ';%d: %s' % (self.retcode, self.output.decode('utf-8', errors = 'backslashreplace'))) -- cgit v1.2.3