diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-02-13 21:39:41 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-02-13 21:39:41 +0100 |
commit | f1ef9c053c84515761f59412a91ca3adbc8e7392 (patch) | |
tree | 9adfb42a73cf1aa61556d16ee5665e6c3f611dd4 /bupper/exceptions.py | |
parent | b476a22f4a85d90ccaec2ee27a528d5bfe428a82 (diff) |
Move the python files to a package.
Diffstat (limited to 'bupper/exceptions.py')
-rw-r--r-- | bupper/exceptions.py | 11 |
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'))) |