From 88861ad69d45546bb276aeddeca4adfc7eeafdf1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 18 Nov 2019 15:57:51 +0000 Subject: [PATCH] Redundant condition --- daemon.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 8908978c..af635c3c 100644 --- a/daemon.py +++ b/daemon.py @@ -1311,12 +1311,11 @@ class PubServer(BaseHTTPRequestHandler): mediaFilename= \ self.server.baseDir+'/img/icons/'+mediaStr if os.path.isfile(mediaFilename): - if mediaFilename.endswith('.png'): - with open(mediaFilename, 'rb') as avFile: - mediaBinary = avFile.read() - self._set_headers('image/png',len(mediaBinary),cookie) - self._write(mediaBinary) - return + with open(mediaFilename, 'rb') as avFile: + mediaBinary = avFile.read() + self._set_headers('image/png',len(mediaBinary),cookie) + self._write(mediaBinary) + return self._404() return