'make python2 BaseHTTPRequestHandler happy'

def finish(self):

    try:
        BaseHTTPServer.BaseHTTPRequestHandler.finish(self)
    except (socket.error, ssl.SSLError, OpenSSL.SSL.Error) as e:
        if (e.args[0] not in (errno.ECONNABORTED, errno.ECONNRESET, errno.EPIPE)):
            raise
