From 92b229b6d49281f29b5bf8abc1b2f16d60fe07b4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 25 Aug 2019 22:12:04 +0100 Subject: [PATCH] Check that filename exists --- daemon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index d7ca57af..bf35dbe0 100644 --- a/daemon.py +++ b/daemon.py @@ -1965,8 +1965,9 @@ class PubServer(BaseHTTPRequestHandler): fields['location'], \ fields['duration'], self.server.debug) - if os.path.isfile(filename): - os.remove(filename) + if filename: + if os.path.isfile(filename): + os.remove(filename) self.postToNickname=nickname if self._postToOutbox(messageJson): return 1