summaryrefslogtreecommitdiff
path: root/bupper/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'bupper/exceptions.py')
-rw-r--r--bupper/exceptions.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/bupper/exceptions.py b/bupper/exceptions.py
new file mode 100644
index 0000000..8944fe9
--- /dev/null
+++ b/bupper/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')))