Make console output less verbose for api

master
Arinerron 2018-09-06 21:46:56 -07:00
parent 516d965ad3
commit f10e077896
1 changed files with 2 additions and 7 deletions

View File

@ -59,14 +59,9 @@ class API:
}
for mimetype in mimetypes:
logger.debug(path + ' endswith .' + mimetype + '?')
if path.endswith('.%s' % mimetype):
logger.debug('- True!')
return mimetypes[mimetype]
else:
logger.debug('- no')
logger.debug('%s not in %s' % (path, mimetypes))
return 'text/plain'
def __init__(self, debug):
@ -203,11 +198,11 @@ class API:
time.sleep(self._privateDelayTime - elapsed)
'''
logger.debug('Serving %s' % path)
self.mimeType = API.guessMime(path)
self.overrideCSP = True
logger.debug('Serving %s (mime: %s)' % (path, self.mimeType))
return send_from_directory('static-data/www/ui/dist/', path, mimetype = API.guessMime(path))
@app.route('/client/')