'Flushes the stream.'

def flush(self):

    try:
        stream = cherrypy.serving.request.wsgi_environ.get('wsgi.errors')
    except (AttributeError, KeyError):
        pass
    else:
        stream.flush()
