Check that post is located

main
Bob Mottram 2020-10-06 14:05:15 +01:00
parent df7382af19
commit bee236a44f
1 changed files with 12 additions and 0 deletions

View File

@ -219,6 +219,12 @@ def updateNewswireModerationQueue(baseDir: str, handle: str,
fullPostFilename = \
locatePost(baseDir, nickname,
domain, postUrl, False)
if not fullPostFilename:
print('Unable to locate post ' + postUrl)
ctr += 1
if ctr >= maxBlogsPerAccount:
break
moderationStatusFilename = fullPostFilename + '.moderate'
moderationStatusStr = ''
if not os.path.isfile(moderationStatusFilename):
@ -289,6 +295,12 @@ def addAccountBlogsToNewswire(baseDir: str, nickname: str, domain: str,
fullPostFilename = \
locatePost(baseDir, nickname,
domain, postUrl, False)
if not fullPostFilename:
print('Unable to locate post ' + postUrl)
ctr += 1
if ctr >= maxBlogsPerAccount:
break
postJsonObject = None
if fullPostFilename:
postJsonObject = loadJson(fullPostFilename)