summaryrefslogtreecommitdiff
path: root/lbup/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'lbup/exceptions.py')
-rw-r--r--lbup/exceptions.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lbup/exceptions.py b/lbup/exceptions.py
new file mode 100644
index 0000000..69201ef
--- /dev/null
+++ b/lbup/exceptions.py
@@ -0,0 +1,14 @@
+class BackupException(Exception):
+ pass
+
+class RemoteExecException(BackupException):
+ 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')))