def retry_consensus_after_error(exc):

    log.info("Observed exception: `%r`", exc)

    if isinstance(exc, kazoo.exceptions.KazooException):
        log.info("Retry as of KazooException.")
        return True
    if isinstance(exc, ConnectionLost):
        log.info("Retry as of ConnectionLost.")
        return True
    if isinstance(exc, kazoo.handlers.threading.KazooTimeoutError):
        # https://github.com/python-zk/kazoo/issues/383
        log.info("Retry as of kazoo.handlers.threading.KazooTimeoutError.")
        return True
    return False
Return True if this should be retried.
dataset/ETHPy150Open dcos/dcos/packages/zk-value-consensus/extra/consensus/consensus.py/retry_consensus_after_error