From 8a6b92575a7d2ef088ee2c9081ed418641cfc126 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 4 Jul 2019 21:10:22 +0200 Subject: dashboard: Ignore invalid json input We should be able to recover from this. --- crocoite/irc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crocoite/irc.py b/crocoite/irc.py index cb40f4c..bd13831 100644 --- a/crocoite/irc.py +++ b/crocoite/irc.py @@ -631,7 +631,11 @@ class Dashboard: if not buf: return - data = json.loads (buf) + try: + data = json.loads (buf) + except json.decoder.JSONDecodeError: + # ignore invalid + return msgid = data['uuid'] if msgid in self.ignoreMsgid: -- cgit v1.2.3