diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-04 14:48:48 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-04-04 14:48:48 +0100 |
| commit | 726d4c42dde92c67131ee0311e7f965dd2ea13ad (patch) | |
| tree | aa09780180eac95ba254eb7e9f552e433384cc26 | |
| parent | replaced pdftk by qpdf (diff) | |
| download | paper2remarkable-726d4c42dde92c67131ee0311e7f965dd2ea13ad.tar.gz paper2remarkable-726d4c42dde92c67131ee0311e7f965dd2ea13ad.zip | |
Fix the calledprocesserror by not inheriting
Turns out this never actually worked as intended.
| -rw-r--r-- | paper2remarkable/exceptions.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/paper2remarkable/exceptions.py b/paper2remarkable/exceptions.py index a608bcc..66a329f 100644 --- a/paper2remarkable/exceptions.py +++ b/paper2remarkable/exceptions.py @@ -90,16 +90,13 @@ class RemarkableError(Error): return msg -class _CalledProcessError(CalledProcessError): - """Exception raised when subprocesses fail. +class _CalledProcessError(Error): + """Exception raised when subprocesses fail. """ - We subclass the CalledProcessError so we can add our custom error message. - """ - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) + def __init__(self, message): + self.message = message def __str__(self): - parent = super().__str__() - msg = parent + GH_MSG + msg = "ERROR: {message}".format(message=self.message) + msg += GH_MSG return msg |
