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