From cbfa5907277cd4f6691e6d768a495117aba72a45 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 31 Aug 2019 21:34:16 +0100 Subject: [PATCH] Check that file exists --- daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index 865c64f53..f3adc9154 100644 --- a/daemon.py +++ b/daemon.py @@ -432,7 +432,8 @@ class PubServer(BaseHTTPRequestHandler): print('Inbox queue is full. Removing oldest items.') while len(self.server.inboxQueue) >= self.server.maxQueueLength-4: queueFilename=self.server.inboxQueue[0] - os.remove(queueFilename) + if os.path.isfile(queueFilename): + os.remove(queueFilename) self.server.inboxQueue.pop(0) # Convert the headers needed for signature verification to dict