Check that filename exists

master
Bob Mottram 2019-08-25 22:12:04 +01:00
parent b0b21f7645
commit 92b229b6d4
1 changed files with 3 additions and 2 deletions

View File

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