From 3fff5275db04d0d27aecd8b5f454ef58cf153361 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 19 Feb 2020 18:55:29 +0000 Subject: [PATCH] Avoid none objects --- posts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index ec615102..72558a19 100644 --- a/posts.py +++ b/posts.py @@ -2694,7 +2694,10 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \ objectNickname=getNicknameFromActor(postJsonObject['object']) objectDomain,objectPort=getDomainFromActor(postJsonObject['object']) if isBlocked(baseDir,nickname,domain,objectNickname,objectDomain): - print('Announce download blocked object: '+objectNickname+'@'+objectDomain) + if objectNickname and objectDomain: + print('Announce download blocked object: '+objectNickname+'@'+objectDomain) + else: + print('Announce download blocked object: '+str(postJsonObject['object'])) return None print('Downloading Announce content for '+postJsonObject['object']) announcedJson= \