Check that object is dict

master
Bob Mottram 2019-07-13 15:20:40 +01:00
parent fc7420b2c3
commit 445e49b1d0
1 changed files with 4 additions and 0 deletions

View File

@ -680,6 +680,10 @@ def populateReplies(baseDir :str,httpPrefix :str,domain :str, \
if debug:
print('DEBUG: replied to post has no object - '+postFilename)
return False
if not isinstance(repliedToJson['object'], dict):
if debug:
print('DEBUG: replied to post object is not dict - '+postFilename)
return False
if not repliedToJson['object'].get('replies'):
if debug:
print('DEBUG: replied to post has no replies attribute - '+postFilename)