Reject announce if it is not a dict

main
Bob Mottram 2019-12-04 09:47:35 +00:00
parent e663ec0505
commit 169ce16da3
1 changed files with 1 additions and 1 deletions

View File

@ -2591,10 +2591,10 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str,nickname: str,domain:
if not isinstance(announcedJson, dict): if not isinstance(announcedJson, dict):
print('WARN: announce json is not a dict - '+postJsonObject['object']) print('WARN: announce json is not a dict - '+postJsonObject['object'])
rejectAnnounce(announceFilename)
return None return None
if not announcedJson.get('id'): if not announcedJson.get('id'):
rejectAnnounce(announceFilename) rejectAnnounce(announceFilename)
#pprint(announcedJson)
return None return None
if '/statuses/' not in announcedJson['id']: if '/statuses/' not in announcedJson['id']:
rejectAnnounce(announceFilename) rejectAnnounce(announceFilename)