From e663ec050561178f2359248dbbef186734892291 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 4 Dec 2019 09:44:41 +0000 Subject: [PATCH] Check that announce is a dict --- posts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index 8edebff7..0428e587 100644 --- a/posts.py +++ b/posts.py @@ -2588,7 +2588,10 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str,nickname: str,domain: if not announcedJson: return None - + + if not isinstance(announcedJson, dict): + print('WARN: announce json is not a dict - '+postJsonObject['object']) + return None if not announcedJson.get('id'): rejectAnnounce(announceFilename) #pprint(announcedJson)