diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 00:17:05 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 00:17:05 +0300 |
commit | 75b9ba8dda23a67a578c1a0c6a3163029dcc4bf0 (patch) | |
tree | 2d3e2b72091e3d0df99a0a2ac5c210a9106e91e2 | |
parent | cf31abfa750ed8aecc3ca17f85b7793b63975938 (diff) | |
parent | b37fb3673577af86b00b40b90b3c1a6117dec529 (diff) |
Merge branch 'master' into shell-backdoor
-rwxr-xr-x | inverter-bot | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inverter-bot b/inverter-bot index 907e4fd..d16359d 100755 --- a/inverter-bot +++ b/inverter-bot @@ -84,7 +84,10 @@ def handle_exc(update: Update, e) -> None: logging.exception(str(e)) if isinstance(e, InverterError): - err = json.loads(str(e))['message'] + try: + err = json.loads(str(e))['message'] + except json.decoder.JSONDecodeError: + err = str(e) reply(update, f'<b>Error:</b> {err}') elif not isinstance(e, TimedOut): |