def _is_retryable_exception(e):
    if isinstance(e, urllib3.exceptions.ProtocolError):
        e = e.args[1]
    if isinstance(e, (socket.gaierror, socket.herror)):
        return True
    if isinstance(e, socket.error) and e.errno in _RETRYABLE_SOCKET_ERRORS:
        return True
    return False
Returns True if the exception is always safe to retry.
dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/__init__.py/_is_retryable_exception