Check that file exists

master
Bob Mottram 2019-08-31 21:34:16 +01:00
parent e2ddd3b0de
commit cbfa590727
1 changed files with 2 additions and 1 deletions

View File

@ -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