'Flush the buffer if force=True.
If force=False, this call is a noop.
:param bool force: True if the buffer should be flushed.'

def flush(self, force=False):

    if force:
        if (sys.version_info < (2, 7)):
            logging.handlers.MemoryHandler.flush(self)
        else:
            super(MemoryHandler, self).flush()
