Include exception in timeout log message

This commit is contained in:
Unrud 2017-06-23 21:55:42 +02:00
parent 65a1b572e3
commit 746cd9feb1

View File

@ -129,7 +129,7 @@ class HTTPServer(wsgiref.simple_server.WSGIServer):
def handle_error(self, request, client_address): def handle_error(self, request, client_address):
if issubclass(sys.exc_info()[0], socket.timeout): if issubclass(sys.exc_info()[0], socket.timeout):
self.logger.info("connection timeout") self.logger.info("client timed out", exc_info=True)
else: else:
self.logger.error("An exception occurred during request: %s", self.logger.error("An exception occurred during request: %s",
sys.exc_info()[1], exc_info=True) sys.exc_info()[1], exc_info=True)