Mark failed announce download as rejected

merge-requests/30/head
Bob Mottram 2021-03-05 18:52:36 +00:00
parent 568d73845d
commit 7b92186deb
1 changed files with 9 additions and 0 deletions

View File

@ -1290,6 +1290,15 @@ def individualPostAsHtml(allowDownloads: bool,
YTReplacementDomain,
allowLocalNetworkAccess)
if not postJsonAnnounce:
# if the announce could not be downloaded then mark it as rejected
announceFilename = \
locatePost(baseDir, nickname, domain,
postJsonObject['id'])
if announceFilename:
rejectFile = open(announceFilename + '.reject', "w+")
if rejectFile:
rejectFile.write('\n')
rejectFile.close()
return ''
postJsonObject = postJsonAnnounce