From 7b92186deb5e39f88d34a1a0107ec5248c931a59 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Mar 2021 18:52:36 +0000 Subject: [PATCH] Mark failed announce download as rejected --- webapp_post.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webapp_post.py b/webapp_post.py index c06c55959..2dfee6d26 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -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