Avoid none objects

merge-requests/6/head
Bob Mottram 2020-02-19 18:55:29 +00:00
parent 6bed85c595
commit 3fff5275db
1 changed files with 4 additions and 1 deletions

View File

@ -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):
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= \