summaryrefslogtreecommitdiff
path: root/exceptions.py
blob: 8944fe9cb3b0649bdec0904fd02130044c118ca6 (plain)
1
2
3
4
5
6
7
8
9
10
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')))