From c522ca1d99b815cc6e4453a618a5e4c22183b0b1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 16 Nov 2019 09:57:51 +0000 Subject: [PATCH] queue items may have already been removed by inbox thread --- daemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index ca6a2565..5277a040 100644 --- a/daemon.py +++ b/daemon.py @@ -736,7 +736,10 @@ class PubServer(BaseHTTPRequestHandler): while len(self.server.inboxQueue) >= self.server.maxQueueLength-4: queueFilename=self.server.inboxQueue[0] if os.path.isfile(queueFilename): - os.remove(queueFilename) + try: + os.remove(queueFilename) + except: + pass self.server.inboxQueue.pop(0) timeDiff=str(int((time.time()-cleardownStartTime)*1000)) print('Inbox cleardown took '+timeDiff+' mS')