Remove debug

main
Bob Mottram 2020-05-29 20:42:08 +01:00
parent 56a223f863
commit b3d2b059eb
1 changed files with 0 additions and 6 deletions

View File

@ -1113,7 +1113,6 @@ class PubServer(BaseHTTPRequestHandler):
if 'image/webp' in self.headers['Accept']:
favType = 'image/webp'
favFilename = 'favicon.webp'
print('Sending webp favicon')
# custom favicon
faviconFilename = \
self.server.baseDir + '/' + favFilename
@ -1121,13 +1120,11 @@ class PubServer(BaseHTTPRequestHandler):
# default favicon
faviconFilename = \
self.server.baseDir + '/img/icons/' + favFilename
print('faviconFilename: ' + faviconFilename)
if self._etag_exists(faviconFilename):
# The file has not changed
self._304()
return
if self.server.iconsCache.get(favFilename):
print('Get favicon from cache')
favBinary = self.server.iconsCache[favFilename]
self._set_headers_etag(faviconFilename,
favType,
@ -1136,9 +1133,7 @@ class PubServer(BaseHTTPRequestHandler):
self._write(favBinary)
return
else:
print('Get favicon from file')
if os.path.isfile(faviconFilename):
print('favicon file found')
with open(faviconFilename, 'rb') as favFile:
favBinary = favFile.read()
self._set_headers_etag(faviconFilename,
@ -1147,7 +1142,6 @@ class PubServer(BaseHTTPRequestHandler):
callingDomain)
self._write(favBinary)
self.server.iconsCache[favFilename] = favBinary
print('favicon file send')
return
self._404()
return