summaryrefslogtreecommitdiff
path: root/crocoite
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-07-04 21:10:22 +0200
committerLars-Dominik Braun <lars@6xq.net>2019-07-04 21:10:22 +0200
commit8a6b92575a7d2ef088ee2c9081ed418641cfc126 (patch)
treea1e3df0712adf163e43ae3aa840ac21dce3e1572 /crocoite
parent8846ba569d39efdb35b6ce0ca80d82f3f366d115 (diff)
downloadcrocoite-8a6b92575a7d2ef088ee2c9081ed418641cfc126.tar.gz
crocoite-8a6b92575a7d2ef088ee2c9081ed418641cfc126.tar.bz2
crocoite-8a6b92575a7d2ef088ee2c9081ed418641cfc126.zip
dashboard: Ignore invalid json input
We should be able to recover from this.
Diffstat (limited to 'crocoite')
-rw-r--r--crocoite/irc.py6
1 files changed, 5 insertions, 1 deletions
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: