Check that announce is a dict

main
Bob Mottram 2019-12-04 09:44:41 +00:00
parent 4cbaedffba
commit e663ec0505
1 changed files with 4 additions and 1 deletions

View File

@ -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)