diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-01-08 09:43:40 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2019-01-09 13:51:34 +0100 |
commit | b476a22f4a85d90ccaec2ee27a528d5bfe428a82 (patch) | |
tree | b45dede35480fc6c3f421b5bb5c0286a129993a8 /exceptions.py | |
parent | 34dc258b7f39d3d7db8f4ed2abda03a67f202656 (diff) |
ssh/lvm/lxc backup wip
Diffstat (limited to 'exceptions.py')
-rw-r--r-- | exceptions.py | 11 |
1 files changed, 11 insertions, 0 deletions
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'))) |