From 445e49b1d0c07440cc20c5953ea51c835d7df7a6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 13 Jul 2019 15:20:40 +0100 Subject: [PATCH] Check that object is dict --- inbox.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inbox.py b/inbox.py index b7f1621c..7fab3c75 100644 --- a/inbox.py +++ b/inbox.py @@ -680,6 +680,10 @@ def populateReplies(baseDir :str,httpPrefix :str,domain :str, \ if debug: print('DEBUG: replied to post has no object - '+postFilename) return False + if not isinstance(repliedToJson['object'], dict): + if debug: + print('DEBUG: replied to post object is not dict - '+postFilename) + return False if not repliedToJson['object'].get('replies'): if debug: print('DEBUG: replied to post has no replies attribute - '+postFilename)